summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/desktop/src/context/global-sync.tsx1
-rw-r--r--packages/desktop/src/context/notification.tsx4
2 files changed, 3 insertions, 2 deletions
diff --git a/packages/desktop/src/context/global-sync.tsx b/packages/desktop/src/context/global-sync.tsx
index 7d8186a68..ad3a3bf18 100644
--- a/packages/desktop/src/context/global-sync.tsx
+++ b/packages/desktop/src/context/global-sync.tsx
@@ -138,6 +138,7 @@ export const { use: useGlobalSync, provider: GlobalSyncProvider } = createSimple
}
globalSDK.event.listen((e) => {
+ console.log(e)
const directory = e.name
const event = e.details
diff --git a/packages/desktop/src/context/notification.tsx b/packages/desktop/src/context/notification.tsx
index 839ebfad7..045361630 100644
--- a/packages/desktop/src/context/notification.tsx
+++ b/packages/desktop/src/context/notification.tsx
@@ -51,6 +51,7 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
// })
globalSDK.event.listen((e) => {
+ console.log(e)
const directory = e.name
const event = e.details
const base = {
@@ -58,8 +59,7 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
time: Date.now(),
viewed: false,
}
- console.log(event)
- switch (event.type) {
+ switch (event?.type) {
case "session.idle": {
const sessionID = event.properties.sessionID
const [syncStore] = globalSync.child(directory)