Skip to content

Commit

Permalink
fix sentry crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3orblade committed Mar 8, 2024
1 parent e19bcf1 commit aa40426
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ts/component/editor/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,12 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat

if (isInsideTable) {
const element = blockStore.getMapElement(rootId, block.id);
const rowElement = blockStore.getMapElement(rootId, element.parentId);
const rowElement = blockStore.getMapElement(rootId, element?.parentId);

if (!rowElement) {
return;
};

const idx = rowElement.childrenIds.indexOf(block.id);

if (idx < 0) {
Expand Down

0 comments on commit aa40426

Please sign in to comment.