Skip to content

Commit

Permalink
Fix when editorSettings do not have a default templateLock set
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Jun 13, 2020
1 parent 82e49da commit 8697b04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/column/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ export default compose(

const parentColumnsId = getBlockRootClientId( clientId );
const parentOfColumnsId = getBlockRootClientId( parentColumnsId );
const columnsParentLock = parentOfColumnsId
? getTemplateLock( parentOfColumnsId )
: getTemplateLock();

return {
hasChildBlocks: getBlockOrder( clientId ).length > 0,
columnsParentLock: getTemplateLock( parentOfColumnsId ),
columnsParentLock:
columnsParentLock !== undefined ? columnsParentLock : false,
};
} ),
withDispatch( ( dispatch, ownProps, registry ) => {
Expand Down

0 comments on commit 8697b04

Please sign in to comment.