Skip to content

Commit

Permalink
Guard for no id
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Sep 18, 2023
1 parent 2a7c9ec commit 157537f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function useStyleOverride( { id, css } ) {
useDispatch( blockEditorStore )
);
useEffect( () => {
if ( ! css ) return;
if ( ! id || ! css ) return;
setStyleOverride( id, { css } );
return () => {
deleteStyleOverride( id );
Expand Down

0 comments on commit 157537f

Please sign in to comment.