From 114f1f935c9a03bce8e594c908686cbf536a1603 Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:21:49 -0700 Subject: [PATCH] Deprecate "audio" and "image". --- game/game.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game/game.js b/game/game.js index 7853c3465..95ffbcdea 100644 --- a/game/game.js +++ b/game/game.js @@ -40003,6 +40003,7 @@ }, putDB:(storeName,idbValidKey,value,onSuccess,onError)=>{ if(!lib.db) return Promise.resolve(value); + if(['audio','image'].includes(storeName)) storeName='file'; if(lib.status.reload) return new Promise((resolve,reject)=>lib[_status.dburgent?'ondb2':'ondb'].push(['putDB',[storeName,idbValidKey,value,event=>{ if(typeof onSuccess=='function') onSuccess(event); resolve(event); @@ -40043,6 +40044,7 @@ if(typeof onSuccess=='function') onSuccess(null); resolve(null); }); + if(['audio','image'].includes(storeName)) storeName='file'; if(lib.status.reload) return new Promise((resolve,reject)=>lib[_status.dburgent?'ondb2':'ondb'].push(['getDB',[storeName,query,result=>{ if(typeof onSuccess=='function') onSuccess(result); resolve(result); @@ -40113,6 +40115,7 @@ if(typeof onSuccess=='function') onSuccess(false); resolve(false); }); + if(['audio','image'].includes(storeName)) storeName='file'; if(lib.status.reload) return new Promise((resolve,reject)=>lib[_status.dburgent?'ondb2':'ondb'].push(['deleteDB',[storeName,query,event=>{ if(typeof onSuccess=='function') onSuccess(event); resolve(event);