소스 검색

fix: save data copy to memory

Sv443 11 달 전
부모
커밋
c796187733
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);