Skip to content

Commit

Permalink
List View: Return primitive value for 'hideInserter' in Appender comp…
Browse files Browse the repository at this point in the history
…onent (#52161)
  • Loading branch information
Mamaduka authored Jun 30, 2023
1 parent a149016 commit c8ae928
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/block-editor/src/components/list-view/appender.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ export const Appender = forwardRef(
const { insertedBlock, setInsertedBlock } = useListViewContext();

const instanceId = useInstanceId( Appender );
const { hideInserter } = useSelect(
const hideInserter = useSelect(
( select ) => {
const { getTemplateLock, __unstableGetEditorMode } =
select( blockEditorStore );

return {
hideInserter:
!! getTemplateLock( clientId ) ||
__unstableGetEditorMode() === 'zoom-out',
};
return (
!! getTemplateLock( clientId ) ||
__unstableGetEditorMode() === 'zoom-out'
);
},
[ clientId ]
);
Expand Down

0 comments on commit c8ae928

Please sign in to comment.