lnuxe 2e84835e13 fix(runtime): allow adding a page when the DSL has no pages
The add handler required selectedId to be set for every kind of node. A DSL
with an empty items array leaves selectedId undefined, because updateRoot
only fills it from items[0], so clicking add-page in that state threw a bare
Error and no page was created.

Only require selectedId for regular nodes. Pages and page fragments are
attached to the root and need no anchor node.

fix #653
2026-11-11 17:20:22 +08:00
..