diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts index 8ee1e5575c..1dad1bbd77 100644 --- a/packages/client/src/pizzax.ts +++ b/packages/client/src/pizzax.ts @@ -31,13 +31,13 @@ export class Storage { public readonly reactiveState = {} as ReactiveState; // 簡易的にキューイングして占有ロックとする - private nextIdbJob: Promise = Promise.resolve(); + private currentIdbJob: Promise = Promise.resolve(); private addIdbSetJob(job: () => Promise) { - const promise = this.nextIdbJob.then(job, e => { + const promise = this.currentIdbJob.then(job, e => { console.error('Pizzax failed to save data to idb!', e); return job(); }); - this.nextIdbJob = promise; + this.currentIdbJob = promise; return promise; }