forked from trent_larson/crowd-funder-for-time-pwa
switch the encryption secret from localStorage to IndexedDB (because localStorage gets lost so often)
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
RouteLocationNormalized,
|
||||
RouteRecordRaw,
|
||||
} from "vue-router";
|
||||
import { accountsDB } from "@/db/index";
|
||||
import { accountsDBPromise } from "@/db/index";
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -18,7 +18,7 @@ const enterOrStart = async (
|
||||
from: RouteLocationNormalized,
|
||||
next: NavigationGuardNext,
|
||||
) => {
|
||||
await accountsDB.open();
|
||||
const accountsDB = await accountsDBPromise;
|
||||
const num_accounts = await accountsDB.accounts.count();
|
||||
if (num_accounts > 0) {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user