Skip to content

Commit 347959b

Browse files
committed
Fix incorrect preview revocation code
Also swaps to the dedicated isRootGraph function
1 parent 9de1b44 commit 347959b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/stores/imagePreviewStore.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,12 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
273273
* Does not recurse to contents of nested subgraphs.
274274
*/
275275
function revokeSubgraphPreviews(subgraphNode: SubgraphNode) {
276-
const graphId =
277-
subgraphNode.graph == app.graph ? '' : subgraphNode.graph.id + ':'
278-
revokePreviewsByExecutionId(graphId + subgraphNode.id)
276+
const graphId = subgraphNode.graph.isRootGraph
277+
? ''
278+
: subgraphNode.graph.id + ':'
279+
revokePreviewsByLocatorId(graphId + subgraphNode.id)
279280
for (const node of subgraphNode.subgraph.nodes) {
280-
revokePreviewsByExecutionId(subgraphNode.subgraph.id + node.id)
281+
revokePreviewsByLocatorId(subgraphNode.subgraph.id + node.id)
281282
}
282283
}
283284

0 commit comments

Comments
 (0)