Skip to content

Commit 2b40dd9

Browse files
andrewserongsethrubenstein
authored andcommitted
DimensionsPanel: Only access Object.keys if the object is truthy, and therefore not null (WordPress#51252)
1 parent ee5acb9 commit 2b40dd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export default function DimensionsPanel( {
208208
includeLayoutControls = false,
209209
} ) {
210210
const decodeValue = ( rawValue ) => {
211-
if ( typeof rawValue === 'object' ) {
211+
if ( rawValue && typeof rawValue === 'object' ) {
212212
return Object.keys( rawValue ).reduce( ( acc, key ) => {
213213
acc[ key ] = getValueFromVariable(
214214
{ settings },

0 commit comments

Comments
 (0)