Skip to content

Commit 9922ae0

Browse files
scruffianvcanales
authored andcommitted
Shadows: Don't assume that core provides defaults (#58973)
Co-authored-by: vcanales <vcanales@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org>
1 parent 8f7e6a6 commit 9922ae0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/block-editor/src/components/global-styles/shadow-panel-components.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ import { shadow as shadowIcon, Icon, check } from '@wordpress/icons';
1919
import classNames from 'classnames';
2020

2121
export function ShadowPopoverContainer( { shadow, onShadowChange, settings } ) {
22-
const defaultShadows = settings?.shadow?.presets?.default;
23-
const themeShadows = settings?.shadow?.presets?.theme;
22+
const defaultShadows = settings?.shadow?.presets?.default || [];
23+
const themeShadows = settings?.shadow?.presets?.theme || [];
2424
const defaultPresetsEnabled = settings?.shadow?.defaultPresets;
2525

2626
const shadows = [
2727
...( defaultPresetsEnabled ? defaultShadows : [] ),
28-
...( themeShadows || [] ),
28+
...themeShadows,
2929
];
3030

3131
return (

0 commit comments

Comments
 (0)