mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-01 03:31:58 +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 {
|
#arrangeWidgets(widgetStartY: number): void {
|
||||||
if (!this.widgets || !this.widgets.length) return
|
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 bodyHeight = this.bodyHeight
|
||||||
const startY =
|
const startY =
|
||||||
|
|||||||
Reference in New Issue
Block a user