diff --git a/djx/src/main/ts/tsx/traits.ts b/djx/src/main/ts/tsx/traits.ts --- a/djx/src/main/ts/tsx/traits.ts +++ b/djx/src/main/ts/tsx/traits.ts @@ -134,13 +134,15 @@ export function emptyNode(target: Node) */ export function startupWidgets(target: Node | _WidgetBase, skipNode?: Node) { if (isNode(target)) { - const w = registry.byNode(target); + const w = isElementNode(target) ? registry.byNode(target) : undefined; if (w) { - w.startup && w.startup(); + if (w.startup) + w.startup(); } else { - registry.findWidgets(target, skipNode).forEach(w => w.startup()); + registry.findWidgets(target, skipNode).forEach(x => x.startup()); } } else { - target.startup && target.startup(); + if(target.startup) + target.startup(); } } \ No newline at end of file