mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
refactor: simplify fallback loop to start at segments.length
This commit is contained in:
@@ -90,7 +90,7 @@ export const useModelToNodeStore = defineStore('modelToNode', () => {
|
||||
|
||||
// Try progressively shorter parent paths
|
||||
const segments = modelType.split('/')
|
||||
for (let i = segments.length - 1; i >= 1; i--) {
|
||||
for (let i = segments.length; i >= 1; i--) {
|
||||
const parentPath = segments.slice(0, i).join('/')
|
||||
const fallback = modelToNodeMap.value[parentPath]
|
||||
if (fallback && fallback.length > 0) return fallback
|
||||
|
||||
Reference in New Issue
Block a user