From d36a46c5285074e4beea3d5246b179766766855b Mon Sep 17 00:00:00 2001 From: Black Ram <67595890+BlackRam-oss@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:29:56 +0100 Subject: [PATCH] Refactor id check in putSaveIntoIndexDB to use strict comparison --- src/utilities/save-utility.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities/save-utility.ts b/src/utilities/save-utility.ts index 8f3eb4d..340c7d2 100644 --- a/src/utilities/save-utility.ts +++ b/src/utilities/save-utility.ts @@ -27,7 +27,7 @@ export async function putSaveIntoIndexDB(info: Partial & { id?: nu image: image, ...info, } - if (!item.id) { + if (item.id === undefined) { let lastSave = await getLastRowFromIndexDB(INDEXED_DB_SAVE_TABLE) if (lastSave) { item.id = lastSave.id + 1