Audit the project and secure toolbox data
This commit is contained in:
parent
96af62edf0
commit
e87edda5c7
40 changed files with 2324 additions and 125 deletions
|
|
@ -19,11 +19,12 @@ export function createPersistenceQueue(initialState, onChange) {
|
|||
let failure;
|
||||
try {
|
||||
const next = operation.apply(confirmed);
|
||||
await operation.persist(next);
|
||||
confirmed = next;
|
||||
const persisted = await operation.persist(next, confirmed);
|
||||
confirmed = persisted ?? next;
|
||||
success = true;
|
||||
} catch (error) {
|
||||
failure = error;
|
||||
if (error?.confirmedState) confirmed = error.confirmedState;
|
||||
}
|
||||
pending.shift();
|
||||
publish();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue