diff options
| author | Adam <[email protected]> | 2025-12-15 18:13:11 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-15 18:13:11 -0600 |
| commit | 2c70c0b00fdf7561d1a936043223da8518acde08 (patch) | |
| tree | 134252f7ea9c099e3fc8f92e09b50cd0e4f0805d | |
| parent | 34024c2504d1bdb105e217f5351fd1cb5d7b50a9 (diff) | |
| download | opencode-2c70c0b00fdf7561d1a936043223da8518acde08.tar.gz opencode-2c70c0b00fdf7561d1a936043223da8518acde08.zip | |
fix: undefined events
| -rw-r--r-- | packages/desktop/src/context/global-sync.tsx | 1 | ||||
| -rw-r--r-- | packages/desktop/src/context/notification.tsx | 4 |
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) |
