From 6c4aa87b04e0836f7dc5947bf854c2008822ee96 Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Fri, 12 Dec 2025 11:31:04 -0800 Subject: [PATCH] Remove app.graph usage --- src/stores/subgraphNavigationStore.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stores/subgraphNavigationStore.ts b/src/stores/subgraphNavigationStore.ts index 3a03e17f2..63712175f 100644 --- a/src/stores/subgraphNavigationStore.ts +++ b/src/stores/subgraphNavigationStore.ts @@ -174,7 +174,7 @@ export const useSubgraphNavigationStore = defineStore( oldHash: string | undefined | null ) { if (!oldHash) return - const root = app.graph + const root = app.rootGraph const locatorId = newHash?.slice(1) ?? root.id const canvas = canvasStore.getCanvas() if (canvas.graph?.id === locatorId) return @@ -199,9 +199,9 @@ export const useSubgraphNavigationStore = defineStore( blockHashUpdate = false } const targetGraph = - app.graph.id === locatorId - ? app.graph - : app.graph.subgraphs.get(locatorId) + app.rootGraph.id === locatorId + ? app.rootGraph + : app.rootGraph.subgraphs.get(locatorId) if (!targetGraph) { console.error('subgraph poofed after load?') return @@ -223,11 +223,11 @@ export const useSubgraphNavigationStore = defineStore( return } if (!routeHash.value) { - await router.replace('#' + app.graph.id) + await router.replace('#' + app.rootGraph.id) } const newId = canvasStore.getCanvas().graph?.id ?? '' const currentId = window.location.hash.slice(1) - if (!newId || newId === (currentId || app.graph.id)) return + if (!newId || newId === (currentId || app.rootGraph.id)) return await router.push('#' + newId) } //update navigation hash