Procházet zdrojové kódy

fix: save data copy to memory

Sv443 před 11 měsíci
rodič
revize
c796187733
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      lib/DataStore.ts

+ 1 - 1
lib/DataStore.ts

@@ -117,7 +117,7 @@ export class DataStore<TData = any> {
       if(gmFmtVer < this.formatVersion && this.migrations)
         parsed = await this.runMigrations(parsed, gmFmtVer);
 
-      return { ...(this.cachedData = parsed) };
+      return this.cachedData = { ...parsed };
     }
     catch(err) {
       console.warn("Error while parsing JSON data, resetting it to the default value.", err);