From ed7e1e94efcd7c14ad029a5ab1189b59b2eb5ad5 Mon Sep 17 00:00:00 2001 From: Copons Date: Tue, 11 May 2021 14:32:17 +0100 Subject: [PATCH] Move noop to const --- packages/block-editor/src/components/block-navigation/tree.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-navigation/tree.js b/packages/block-editor/src/components/block-navigation/tree.js index 65f798781364b2..0931c667f8612f 100644 --- a/packages/block-editor/src/components/block-navigation/tree.js +++ b/packages/block-editor/src/components/block-navigation/tree.js @@ -16,6 +16,8 @@ import useBlockNavigationClientIds from './use-block-navigation-client-ids'; import useBlockNavigationDropZone from './use-block-navigation-drop-zone'; import { store as blockEditorStore } from '../../store'; +const noop = () => {}; + /** * Wrap `BlockNavigationRows` with `TreeGrid`. BlockNavigationRows is a * recursive component (it renders itself), so this ensures TreeGrid is only @@ -33,7 +35,7 @@ import { store as blockEditorStore } from '../../store'; export default function BlockNavigationTree( { blocks, showOnlyCurrentHierarchy, - onSelect = () => {}, + onSelect = noop, selectedBlockClientIds, __experimentalFeatures, __experimentalPersistentListViewFeatures,