mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: reset diff caches on graph instance change
Clears nodeStatesCache, currentNodeIds, lastNodeCount, lastLinkCount, and lastGraphVersion when getDataSource detects a new LGraph instance (e.g. subgraph navigation). Prevents stale baselines from masking connection/structure changes on the new graph. Addresses: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9912#discussion_r2934626767
This commit is contained in:
@@ -126,6 +126,11 @@ export function useMinimapGraph(
|
||||
if (cachedDataSource && cachedDataSourceGraph === g) {
|
||||
return cachedDataSource
|
||||
}
|
||||
nodeStatesCache.clear()
|
||||
currentNodeIds.clear()
|
||||
lastNodeCount.value = 0
|
||||
lastLinkCount = 0
|
||||
lastGraphVersion = -1
|
||||
cachedDataSource = MinimapDataSourceFactory.create(g)
|
||||
cachedDataSourceGraph = g
|
||||
return cachedDataSource
|
||||
|
||||
Reference in New Issue
Block a user