Fix UI crash when selecting broken node + TS fixes (#3859)

This commit is contained in:
filtered
2025-05-12 17:57:59 +10:00
committed by GitHub
parent b2f144c27b
commit 7144ec54aa
14 changed files with 65 additions and 59 deletions

View File

@@ -36,7 +36,7 @@ const buttonHovered = ref(false)
const selectedOutputNodes = computed(
() =>
canvasStore.selectedItems.filter(
(item) => isLGraphNode(item) && item.constructor.nodeData.output_node
(item) => isLGraphNode(item) && item.constructor.nodeData?.output_node
) as LGraphNode[]
)
@@ -45,7 +45,7 @@ const isDisabled = computed(() => selectedOutputNodes.value.length === 0)
function outputNodeStokeStyle(this: LGraphNode) {
if (
this.selected &&
this.constructor.nodeData.output_node &&
this.constructor.nodeData?.output_node &&
buttonHovered.value
) {
return { color: 'orange', lineWidth: 2, padding: 10 }