From 24a2fff9294fa6288c2afed373c8d3a9ca515ea1 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 30 Dec 2021 03:42:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=91=E3=83=86=E3=82=A3?= =?UTF-8?q?=E5=90=8D=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/pizzax.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts index 8ee1e5575..1dad1bbd7 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; }