Skip to content

Commit

Permalink
Guard for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 14, 2024
1 parent ffc9047 commit 1bf1461
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function GlobalStylesSidebar() {
const previousActiveAreaRef = useRef( null );

useEffect( () => {
if ( path.startsWith( '/wp_global_styles' ) && canvas === 'edit' ) {
if ( path?.startsWith( '/wp_global_styles' ) && canvas === 'edit' ) {
previousActiveAreaRef.current =
getActiveComplementaryArea( 'core' );
enableComplementaryArea( 'core', 'edit-site/global-styles' );
Expand Down

0 comments on commit 1bf1461

Please sign in to comment.