Skip to content

Commit

Permalink
catch and continue
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgoringe committed Nov 25, 2024
1 parent 5306aff commit f9f9c9a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions js/nodeblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,17 @@ export class NodeBlock extends HTMLSpanElement {
this.node.widgets?.forEach(w => {
if (!this.node.properties.controller_widgets[w.name]) this.node.properties.controller_widgets[w.name] = {}
const properties = this.node.properties.controller_widgets[w.name]
const e = new Entry(this.parent_controller, this, this.node, w, properties)
if (e.valid()) {
new_main.appendChild(e)
this[w.name] = e
this.widget_count += 1
} else {
e._remove()
try {
const e = new Entry(this.parent_controller, this, this.node, w, properties)
if (e.valid()) {
new_main.appendChild(e)
this[w.name] = e
this.widget_count += 1
} else {
e._remove()
}
} catch (e) {
Debug.error(`adding widget on node ${this.node.id}`, e)
}
})

Expand Down

0 comments on commit f9f9c9a

Please sign in to comment.