Skip to content

Commit

Permalink
DimensionsPanel: Only access Object.keys if the object is truthy, and…
Browse files Browse the repository at this point in the history
… therefore not null (#51252)
  • Loading branch information
andrewserong authored Jun 6, 2023
1 parent 4ed9a02 commit 80678f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default function DimensionsPanel( {
includeLayoutControls = false,
} ) {
const decodeValue = ( rawValue ) => {
if ( typeof rawValue === 'object' ) {
if ( rawValue && typeof rawValue === 'object' ) {
return Object.keys( rawValue ).reduce( ( acc, key ) => {
acc[ key ] = getValueFromVariable(
{ settings },
Expand Down

0 comments on commit 80678f9

Please sign in to comment.