bugfix: deindex not working for idx 0

This commit is contained in:
May 2023-10-01 17:41:31 -07:00
parent e54f6a5b8f
commit 11602b5556

View file

@ -109,7 +109,7 @@ export namespace files {
let acc = Accounts.find(e => e.id == accountId) let acc = Accounts.find(e => e.id == accountId)
if (!acc) return if (!acc) return
let fi = acc.files.findIndex(e => e == fileId) let fi = acc.files.findIndex(e => e == fileId)
if (fi) { if (fi >= 0) {
acc.files.splice(fi,1) acc.files.splice(fi,1)
if (!noWrite) return save() if (!noWrite) return save()
} }