プロパティ名変更
This commit is contained in:
parent
e60517f53b
commit
24a2fff929
@ -31,13 +31,13 @@ export class Storage<T extends StateDef> {
|
|||||||
public readonly reactiveState = {} as ReactiveState<T>;
|
public readonly reactiveState = {} as ReactiveState<T>;
|
||||||
|
|
||||||
// 簡易的にキューイングして占有ロックとする
|
// 簡易的にキューイングして占有ロックとする
|
||||||
private nextIdbJob: Promise<any> = Promise.resolve();
|
private currentIdbJob: Promise<any> = Promise.resolve();
|
||||||
private addIdbSetJob<T>(job: () => Promise<T>) {
|
private addIdbSetJob<T>(job: () => Promise<T>) {
|
||||||
const promise = this.nextIdbJob.then(job, e => {
|
const promise = this.currentIdbJob.then(job, e => {
|
||||||
console.error('Pizzax failed to save data to idb!', e);
|
console.error('Pizzax failed to save data to idb!', e);
|
||||||
return job();
|
return job();
|
||||||
});
|
});
|
||||||
this.nextIdbJob = promise;
|
this.currentIdbJob = promise;
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user