Skip to content

Commit

Permalink
Do not optional chain something that is not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini committed Oct 20, 2023
1 parent 3446d42 commit 80dfffc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/html/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const DEFAULT_STYLES = `
`;

export default function HTMLEditPreview( { content, isSelected } ) {
const settingStyles = useSelect( ( select ) => {
return select( blockEditorStore ).getSettings()?.styles ?? [];
}, [] );
const settingStyles = useSelect(
( select ) => select( blockEditorStore ).getSettings().styles
);

const styles = useMemo(
() => [ DEFAULT_STYLES, ...transformStyles( settingStyles ) ],
Expand Down

0 comments on commit 80dfffc

Please sign in to comment.