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