From dbc88a83f112c7f6ca2147a81d9b39a2270108a4 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Fri, 5 Jan 2024 16:03:31 +0530 Subject: [PATCH] background bug fix --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 0ebddce..724afb3 100644 --- a/index.html +++ b/index.html @@ -4635,8 +4635,11 @@ }) getRef('select_bg_image').addEventListener('change', function (e) { - Promise.all([compactIDB.writeData('userSettings', true, 'hasSelectedBg'), - compactIDB.writeData('userSettings', this.files[0], 'bgImage')]) + if (!this.files.length) return + Promise.all([ + compactIDB.writeData('userSettings', true, 'hasSelectedBg'), + compactIDB.writeData('userSettings', this.files[0], 'bgImage') + ]) .then(async res => { setBgImage() notify('Background applied', 'success')