mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 06:44:32 +00:00
Fix guard on selected item watch
This commit is contained in:
@@ -178,8 +178,9 @@ const { y: outputScrollState } = useScroll(outputsRef)
|
||||
|
||||
watch(activeLoad, () => {
|
||||
const [index, key] = activeLoad.value
|
||||
if (index < 0 || key < 0 || !outputsRef.value) return
|
||||
const outputElement = outputsRef.value.children[index].children[key]
|
||||
if (!outputsRef.value) return
|
||||
const outputElement = outputsRef.value?.children?.[index]?.children?.[key]
|
||||
if (!outputElement) return
|
||||
//container: 'nearest' is nice, but bleeding edge and chrome only
|
||||
outputElement.scrollIntoView({ block: 'nearest' })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user