Skip to content

Commit

Permalink
Merge pull request #3617 from neos/bugfix/inspectorFocusedNodeParentNull
Browse files Browse the repository at this point in the history
BUGFIX: `Cannot read properties of null (reading 'parent')`
  • Loading branch information
Sebobo authored Oct 11, 2023
2 parents 32f8dc5 + 524dc6a commit f20108e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import style from './style.css';
const shouldShowUnappliedChangesOverlay = isDirty && !shouldPromptToHandleUnappliedChanges;
const shouldShowSecondaryInspector = selectors.UI.Inspector.shouldShowSecondaryInspector(state);
const focusedNode = selectors.CR.Nodes.focusedSelector(state);
const parentNode = selectors.CR.Nodes.nodeByContextPath(state)(focusedNode.parent);
const parentNode = focusedNode ? selectors.CR.Nodes.nodeByContextPath(state)(focusedNode.parent) : null;

return {
focusedNode,
Expand Down

0 comments on commit f20108e

Please sign in to comment.