fix: history sync issues and crashes

This commit is contained in:
Andrew Bastin
2021-08-21 12:37:26 +05:30
parent c00c8f249e
commit 732dc07ec5
2 changed files with 9 additions and 2 deletions

View File

@@ -36,7 +36,10 @@ async function writeHistory(entry: any, col: HistoryFBCollections) {
if (currentUser$.value == null)
throw new Error("User not logged in to sync history")
const hs = entry
const hs = {
...entry,
updatedOn: new Date(),
}
try {
await firebase
@@ -200,3 +203,7 @@ export function initHistory() {
}
})
}
restHistoryStore.dispatches$.subscribe((state) => {
console.log(state)
})