Skip to content

Commit ef18eea

Browse files
committed
fix typescript error
1 parent fc9c29e commit ef18eea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/packages/frontend/frame-editors/frame-tree/frame-tree-drag-bar.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export const FrameTreeDragBar: React.FC<Props> = React.memo((props: Props) => {
8080
const offsetNode = dir === "col" ? ui.node.offsetLeft : ui.node.offsetTop;
8181
const offset = offsetNode + ui[axis] + DRAG_OFFSET;
8282
const elt = containerRef.current;
83+
if (elt == null) {
84+
return;
85+
}
8386
const pos =
8487
dir === "col"
8588
? (offset - elt.offsetLeft) / elt.offsetWidth

0 commit comments

Comments
 (0)