mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Improve code quality
This commit is contained in:
committed by
Alexander Brown
parent
3021ea9afe
commit
8d622e6519
@@ -3998,12 +3998,10 @@ 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 realWidgets = this.widgets.filter((w) => w)
|
||||
if (realWidgets.length != this.widgets.length) {
|
||||
console.error('Removing undefined widgets from', this)
|
||||
this.widgets.splice(0, this.widgets.length, ...realWidgets)
|
||||
}
|
||||
|
||||
const bodyHeight = this.bodyHeight
|
||||
|
||||
Reference in New Issue
Block a user