handle minimap cleanup called before map set (#5038)

Co-authored-by: bymyself <cbyrne@comfy.org>
This commit is contained in:
ComfyUI Wiki
2025-08-18 00:46:59 +08:00
committed by GitHub
parent 88579c2a40
commit 69c660b3b7

View File

@@ -685,9 +685,10 @@ export function useMinimap() {
const originalCallbacks = originalCallbacksMap.get(g.id)
if (!originalCallbacks) {
throw new Error(
console.error(
'Attempted to cleanup event listeners for graph that was never set up'
)
return
}
g.onNodeAdded = originalCallbacks.onNodeAdded