From ccb10c6a4ac708795c7fb5644af30fe43a58df6f Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:34:33 -0700 Subject: [PATCH] Add the migration. --- game/game.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/game/game.js b/game/game.js index fa759c89f..6914ab241 100644 --- a/game/game.js +++ b/game/game.js @@ -9371,19 +9371,13 @@ if(!idbDatabase.objectStoreNames.contains('file')) idbDatabase.createObjectStore('file').transaction.oncomplete=()=>{ if(idbDatabase.objectStoreNames.contains('audio')) idbDatabase.transaction('audio').objectStore('audio').openCursor().onsuccess=event=>{ const result=event.target.result; - if(!result){ - idbDatabase.deleteObjectStore('audio'); - return; - } + if(!result) return; idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key); result.continue(); }; if(idbDatabase.objectStoreNames.contains('image')) idbDatabase.transaction('image').objectStore('image').openCursor().onsuccess=event=>{ const result=event.target.result; - if(!result){ - idbDatabase.deleteObjectStore('image'); - return; - } + if(!result) return; idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key); result.continue(); };