forked from mystiq/hydrogen-web
nuke db on startup
This commit is contained in:
parent
9f7297f62b
commit
9a8434b1f6
1 changed files with 5 additions and 0 deletions
|
@ -60,6 +60,11 @@
|
||||||
let storage;
|
let storage;
|
||||||
const loadStorage = async () => {
|
const loadStorage = async () => {
|
||||||
await platform.logger.run("login", async log => {
|
await platform.logger.run("login", async log => {
|
||||||
|
try {
|
||||||
|
await factory.delete(hydrogenSessionID);
|
||||||
|
} catch (err) {
|
||||||
|
console.log("failed to delete old indexeddb:", err);
|
||||||
|
}
|
||||||
storage = await factory.create(hydrogenSessionID, log);
|
storage = await factory.create(hydrogenSessionID, log);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue