Skip to content

Commit 3a258f8

Browse files
committed
fix: guard against GridStack.init() returning null in gridstack 13
gridstack 13's types widen GridStack.init()'s return type to include null; add the corresponding early return before using the instance.
1 parent 574eb18 commit 3a258f8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/components/dashboard/DashboardGrid.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ export default function DashboardGrid({
148148
},
149149
});
150150

151+
if (!grid) return;
152+
151153
gridRef.current = grid;
152154

153155
grid.on("change", () => {

0 commit comments

Comments
 (0)