From b357dc8e2f23ea1e93815e8d9eaa213a02203125 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 14 Jun 2021 09:24:46 -0400 Subject: [PATCH] Fix history sync issues --- helpers/fb/history.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/fb/history.ts b/helpers/fb/history.ts index 318fdb97a..f806e18a5 100644 --- a/helpers/fb/history.ts +++ b/helpers/fb/history.ts @@ -86,6 +86,8 @@ async function toggleStar(entry: any, col: HistoryFBCollections) { if (currentUser$.value == null) throw new Error("User not logged in to toggle star") + console.log(entry) + try { await firebase .firestore() @@ -93,7 +95,7 @@ async function toggleStar(entry: any, col: HistoryFBCollections) { .doc(currentUser$.value.uid) .collection(col) .doc(entry.id) - .update({ state: !entry.star }) + .update({ star: !entry.star }) } catch (e) { console.error("error toggling star", entry, e) throw e