Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 2c70c0b

Browse files
committed
fix: undefined events
1 parent 34024c2 commit 2c70c0b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/desktop/src/context/global-sync.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export const { use: useGlobalSync, provider: GlobalSyncProvider } = createSimple
138138
}
139139

140140
globalSDK.event.listen((e) => {
141+
console.log(e)
141142
const directory = e.name
142143
const event = e.details
143144

packages/desktop/src/context/notification.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
5151
// })
5252

5353
globalSDK.event.listen((e) => {
54+
console.log(e)
5455
const directory = e.name
5556
const event = e.details
5657
const base = {
5758
directory,
5859
time: Date.now(),
5960
viewed: false,
6061
}
61-
console.log(event)
62-
switch (event.type) {
62+
switch (event?.type) {
6363
case "session.idle": {
6464
const sessionID = event.properties.sessionID
6565
const [syncStore] = globalSync.child(directory)

0 commit comments

Comments
 (0)