Skip to content

Commit 3bd8cee

Browse files
authored
fix (customizer): use optional chaining (#3485)
1 parent 33cb28d commit 3bd8cee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/higher-order/with-visual-guide/visual-guide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const VisualGuideer = props => {
2121

2222
const computedStyles = useMemo( () => {
2323
const firstElSelector = highlightSelector.split( ',' )[ 0 ]
24-
const el = getEditorDom().querySelector( firstElSelector )
24+
const el = getEditorDom()?.querySelector( firstElSelector )
2525

2626
// We can sometimes not find the element when we switched device types,
2727
// just try again when that happens.

0 commit comments

Comments
 (0)