Layout ยท console.warn
layout: close("{id}") - no such window.
Printed by Layout, prefixed [lattice], since 1.53.0.
Warnings reference › layout.close.unknown
- Identifier
layout.close.unknown- Raised by
- Layout
- Since
- 1.53.0
What happened
layout.close(id) was called with an id the layout does not hold. Nothing was closed and the call returned false. The usual causes are a typo, an id that was never added, and calling close twice for the same window - the second call arrives after the window has already gone.
The fix
Check the id against layout.windows(); ids are compared as strings, so a numeric id and its string form are the same window but a trailing space is not. Guard repeat calls on the window:closed event rather than on your own bookkeeping.
Reference
Covered in full at the API reference.