From 7ab5f0322276f35f8ac027caa1b112f7000e4796 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Sat, 24 Apr 2021 05:21:46 +0300 Subject: [PATCH] Rewrite to please the linter --- .../src/components/block-list/index.native.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/block-list/index.native.js b/packages/block-editor/src/components/block-list/index.native.js index c1dffc2763e8ff..eb029fb3e813e9 100644 --- a/packages/block-editor/src/components/block-list/index.native.js +++ b/packages/block-editor/src/components/block-list/index.native.js @@ -198,7 +198,8 @@ export class BlockList extends Component { isBlockInsertionPointVisible !== prevProps.isBlockInsertionPointVisible ) { - const insertionPointInRootList = insertionPoint.rootClientId === undefined; + const insertionPointInRootList = + insertionPoint.rootClientId === undefined; if ( insertionPointInRootList && isBlockInsertionPointVisible ) { const jumpToIndex = insertionPoint.index - 1; // scrolling goes to the bottom of the item so, let's scroll to one above const offset = @@ -209,9 +210,11 @@ export class BlockList extends Component { blockClientIds, jumpToIndex ); - Platform.OS === 'android' - ? this.scrollViewRef.scrollToOffset( { offset } ) - : this.scrollViewRef.scrollTo( { y: offset } ); + if ( Platform.OS === 'android' ) { + this.scrollViewRef.scrollToOffset( { offset } ); + } else { + this.scrollViewRef.scrollTo( { y: offset } ); + } } } }