Skip to content

Commit

Permalink
Check for string insteadd of truthy
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen authored and sirreal committed Oct 27, 2020
1 parent 6df07d8 commit c10c09c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,11 @@ export const __experimentalGetParsedReusableBlock = createSelector(

// Only reusableBlock.content.raw should be used here, `reusableBlock.content` is a
// workaround until #22127 is fixed.
return parse( reusableBlock.content.raw || reusableBlock.content );
return parse(
typeof reusableBlock.content.raw === 'string'
? reusableBlock.content.raw
: reusableBlock.content
);
},
( state ) => [ getReusableBlocks( state ) ]
);
Expand Down

0 comments on commit c10c09c

Please sign in to comment.