Skip to content

Commit

Permalink
Try breaking DisableNonPageContentBlocks into separate useEffect calls
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Dec 11, 2024
1 parent 82c2671 commit 0cef3d4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ export default function DisableNonPageContentBlocks() {
setBlockEditingMode( clientId, 'contentOnly' );
}
}
for ( const clientId of disabledIds ) {
setBlockEditingMode( clientId, 'disabled' );
}
} );

return () => {
Expand All @@ -98,7 +95,7 @@ export default function DisableNonPageContentBlocks() {
}
} );
};
}, [ templateParts, isNavigationMode, registry, disabledIds ] );
}, [ templateParts, isNavigationMode, registry ] );

useEffect( () => {
const { setBlockEditingMode, unsetBlockEditingMode } =
Expand Down

0 comments on commit 0cef3d4

Please sign in to comment.