From 0e64fd10f2205de340448596e2d80fab655f6e3c Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:22:51 +1100 Subject: [PATCH] Remove unneeded optional chaining Co-authored-by: Kai Hao --- .../src/components/list-view/use-list-view-scroll-into-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js b/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js index 1ce99deb3053a6..bee9c3b87a729a 100644 --- a/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js +++ b/packages/block-editor/src/components/list-view/use-list-view-scroll-into-view.js @@ -9,7 +9,7 @@ export default function useListViewScrollIntoView( { selectedClientIds, rowItemRef, } ) { - const isSingleSelection = selectedClientIds?.length === 1; + const isSingleSelection = selectedClientIds.length === 1; useLayoutEffect( () => { // Skip scrolling into view if this particular block isn't selected,