Skip to content

Commit

Permalink
Add null coalescing on design style after argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardo-godaddy committed Apr 10, 2024
1 parent 39adcb8 commit bbce1c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extensions/site-design/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function SiteDesignStyles() {
// Here we move the style element so that we can continue to target and change on user action.
// Only move element if it is not yet under the desktop preview div.
if ( ! stylesElement.closest( 'div.is-desktop-preview' ) ) {
document.querySelectorAll( '.is-desktop-preview style:last-of-type' )?.[ 0 ].after( stylesElement );
document.querySelectorAll( '.is-desktop-preview style:last-of-type' )?.[ 0 ]?.after?.( stylesElement );
}
}, [ isUpdating, designResp ] );

Expand Down

0 comments on commit bbce1c6

Please sign in to comment.