Starting on the pixelEditor. Fixing state reset issue when moving stateful components in the store path. adding hasField host function

This commit is contained in:
Dustin Swan 2026-02-21 20:11:49 -07:00
parent 080273ac25
commit eb5618c64e
No known key found for this signature in database
GPG key ID: 30D46587E2100467
4 changed files with 61 additions and 5 deletions

View file

@ -70,7 +70,8 @@ export function runAppCompiled(canvas: HTMLCanvasElement, store: any) {
function expandStateful(ui: UIValue, path: number[], renderedKeys: Set<string>): UIValue {
switch (ui.kind) {
case 'stateful': {
const fullKey = [...path, ui.key].join('.');
// const fullKey = [...path, ui.key].join('.');
const fullKey = [...path.filter((p: any) => typeof p === 'string'), ui.key].join('.');
renderedKeys.add(fullKey);
let instance = componentInstances.get(fullKey);