From 742cf10deeffb31292cdbf8a5ca7afb07698d9dc Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Fri, 19 Dec 2025 14:38:25 -0600
Subject: fix(desktop): removed projects

---
 packages/desktop/src/context/local.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

diff --git a/packages/desktop/src/context/local.tsx b/packages/desktop/src/context/local.tsx
index 2ea4de524..f56973835 100644
--- a/packages/desktop/src/context/local.tsx
+++ b/packages/desktop/src/context/local.tsx
@@ -337,6 +337,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
       const load = async (path: string) => {
         const relativePath = relative(path)
         await sdk.client.file.read({ path: relativePath }).then((x) => {
+          if (!store.node[relativePath]) return
           setStore(
             "node",
             relativePath,
@@ -425,7 +426,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
         init,
         expand(path: string) {
           setStore("node", path, "expanded", true)
-          if (store.node[path].loaded) return
+          if (store.node[path]?.loaded) return
           setStore("node", path, "loaded", true)
           list(path)
         },
-- 
cgit v1.2.3

