Lattice Grid Buy a licence

designer ยท console.warn

designer.setState: the state is not an objec...

Printed by designer, prefixed [lattice], since 1.88.0.

Warnings reference › designer:state

Identifier
designer:state
Raised by
designer
Since
1.88.0

What happened

setState replaces the designer's state with a state object, { schemaVersion, pages, selectedPageId, panels }. The value given was not an object, so nothing changed, no event was sent and false was returned.

The fix

Pass a state object, such as one designer.getState() or a state event returned.

The smallest fix

designer.setState(JSON.parse(saved));

Reference

Covered in full at the API reference.