mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 09:00:16 +00:00
Add safety check for undefined widgets
This commit is contained in:
committed by
Alexander Brown
parent
60647fd5b9
commit
3021ea9afe
@@ -3998,6 +3998,13 @@ export class LGraphNode
|
||||
*/
|
||||
#arrangeWidgets(widgetStartY: number): void {
|
||||
if (!this.widgets || !this.widgets.length) return
|
||||
for (let i = 0; i < this.widgets.length; i++) {
|
||||
if (!this.widgets[i]) {
|
||||
console.error('Removing undefined widget in', this)
|
||||
this.widgets.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
}
|
||||
|
||||
const bodyHeight = this.bodyHeight
|
||||
const startY =
|
||||
|
||||
Reference in New Issue
Block a user