Firefox issue.

This commit is contained in:
Eric van der Vlist 2023-02-12 14:47:03 +01:00
parent 8a63cc07f4
commit c992782ab7
1 changed files with 4 additions and 5 deletions

View File

@ -22,8 +22,7 @@ export const watchDbLegacy = async () => {
createRoot(async (dispose) => {
console.log({ caller: 'watchDbLegacy / start' });
db = globalThis.db;
localDb = globalThis.localDb;
const { db, localDb, remoteDb, sync, currentAccount } = globalThis;
const [status, setStatus] = createSignal<any>({});
const [syncState, setSyncState] = createSignal<any>({});
@ -31,7 +30,7 @@ export const watchDbLegacy = async () => {
const updateStatus = async () => {
const dbInfo = await db.info();
const localDbInfo = await localDb.info();
const remoteDbInfo = globalThis.remoteDb
const remoteDbInfo = remoteDb
? await remoteDb.info()
: undefined;
const tasks = PouchDB.activeTasks.list();
@ -73,8 +72,8 @@ export const watchDbLegacy = async () => {
updateStatus();
if (globalThis.sync) {
globalThis.sync
if (sync) {
sync
.on('change', function (info) {
// handle change
// console.log({ caller: 'Sync / change', info });