From 2c70c0b00fdf7561d1a936043223da8518acde08 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Mon, 15 Dec 2025 18:13:11 -0600
Subject: fix: undefined events

---
 packages/desktop/src/context/notification.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'packages/desktop/src/context/notification.tsx')

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)
-- 
cgit v1.2.3

