Skip to content

Commit 0186cfa

Browse files
committed
add this protective return if rootNode is null, even though i don't believe it is possible for rootNode to be null at this point.
1 parent 84f1cee commit 0186cfa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

frontend/layout/lib/layoutModel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ export class LayoutModel {
411411
const tab = this.getter(this.tabAtom);
412412
const layoutBlockIds = new Set<string>();
413413

414+
if (this.treeState.rootNode == null) {
415+
return;
416+
}
417+
414418
walkNodes(this.treeState.rootNode, (node) => {
415419
if (node.data?.blockId) {
416420
layoutBlockIds.add(node.data.blockId);

0 commit comments

Comments
 (0)