background bug fix

This commit is contained in:
sairaj mote 2024-01-05 16:03:31 +05:30
parent cee5644264
commit dbc88a83f1

View File

@ -4635,8 +4635,11 @@
}) })
getRef('select_bg_image').addEventListener('change', function (e) { getRef('select_bg_image').addEventListener('change', function (e) {
Promise.all([compactIDB.writeData('userSettings', true, 'hasSelectedBg'), if (!this.files.length) return
compactIDB.writeData('userSettings', this.files[0], 'bgImage')]) Promise.all([
compactIDB.writeData('userSettings', true, 'hasSelectedBg'),
compactIDB.writeData('userSettings', this.files[0], 'bgImage')
])
.then(async res => { .then(async res => {
setBgImage() setBgImage()
notify('Background applied', 'success') notify('Background applied', 'success')