Fix slice and serialization

lazy doesn't seem to track correctly on the backend. Needs further
investigation
This commit is contained in:
Austin Mroz
2026-03-24 20:26:08 -07:00
parent 9ba97045ea
commit 9199b70e07

View File

@@ -129,10 +129,12 @@ function onBranchSelectorCreated(this: LGraphNode) {
this.widgets?.pop()
const values = () =>
this.inputs.slice(0, -2).map((i) => i.label ?? i.localized_name ?? i.name)
this.inputs.slice(0, -1).map((i) => i.label ?? i.localized_name ?? i.name)
const comboWidget = this.addWidget('combo', 'branch', '', () => {}, {
values
})
comboWidget.serializeValue = () =>
values().findIndex((e) => e === comboWidget.value)
this.onConnectionsChange = useChainCallback(this.onConnectionsChange, () =>
requestAnimationFrame(() => {
const vals = values()