Fix bug when error on sync

This commit is contained in:
Fabian Stamm 2020-11-24 19:41:19 +01:00
parent 3c80ac3125
commit e873ae0396
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { Lock, Observable } from "@hibas123/utils";
import * as aesjs from "aes-js";
import { IDBPTransaction } from "idb";
import { sha256 } from "js-sha256";
import * as uuidv4 from "uuid/v4";
import { v4 as uuidv4 } from "uuid";
import * as config from "../config.json";
import * as b64 from "./helper/base64";
import IDB from "./helper/indexeddb";
@ -398,6 +398,7 @@ class NotesProvider {
log(id, "DO NOTHING");
stats.do_nothing++;
}
await this.oplogDB.delete(id);
} catch (err) {
console.error(err);
stats.error++;
@ -406,7 +407,6 @@ class NotesProvider {
MessageType.ERROR
);
}
await this.oplogDB.delete(id);
}
log("Stats", stats);
this.syncedObservableServer.send(