M src/device.js => src/device.js +1 -1
@@ 120,7 120,7 @@ function drawRendered (render, pos) {
? vecadd(pos, render.el.pos)
: pos
)
- if (render.el) {
+ if (render.el && render.el.type) {
draw(render.el, newPos)
}
// Either way, draw each of the children as well
M src/utils.js => src/utils.js +7 -1
@@ 42,9 42,15 @@ function withSetAtPath (paths, partial, data) {
return data
}
const [path, ...otherPaths] = paths;
+ const inner = withSetAtPath(otherPaths, (partial || {})[path], data)
+ if (partial && Array.isArray(partial)) {
+ const newPartial = partial.slice()
+ newPartial[path] = inner
+ return newPartial
+ }
return {
...(partial || {}),
- [path]: withSetAtPath(otherPaths, (partial || {})[path], data)
+ [path]: inner
}
}