fix: history sync issues and crashes
This commit is contained in:
@@ -36,7 +36,10 @@ async function writeHistory(entry: any, col: HistoryFBCollections) {
|
|||||||
if (currentUser$.value == null)
|
if (currentUser$.value == null)
|
||||||
throw new Error("User not logged in to sync history")
|
throw new Error("User not logged in to sync history")
|
||||||
|
|
||||||
const hs = entry
|
const hs = {
|
||||||
|
...entry,
|
||||||
|
updatedOn: new Date(),
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await firebase
|
await firebase
|
||||||
@@ -200,3 +203,7 @@ export function initHistory() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restHistoryStore.dispatches$.subscribe((state) => {
|
||||||
|
console.log(state)
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { isEqual } from "lodash"
|
import isEqual from "lodash/isEqual"
|
||||||
import { combineLatest } from "rxjs"
|
import { combineLatest } from "rxjs"
|
||||||
import { distinctUntilChanged, map, pluck } from "rxjs/operators"
|
import { distinctUntilChanged, map, pluck } from "rxjs/operators"
|
||||||
import DispatchingStore, {
|
import DispatchingStore, {
|
||||||
|
|||||||
Reference in New Issue
Block a user