Skip to content

Commit

Permalink
Call getBlockInsertionPoint once
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Nov 9, 2020
1 parent c5817dd commit e707a30
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ function useInsertionPoint( {
} else {
// Otherwise, we're in "auto mode" where the insertion point is
// decided by getBlockInsertionPoint().

_destinationRootClientId = getBlockInsertionPoint()
.rootClientId;
_destinationIndex = getBlockInsertionPoint().index;
const insertionPoint = getBlockInsertionPoint();
_destinationRootClientId = insertionPoint.rootClientId;
_destinationIndex = insertionPoint.index;
}

return {
Expand Down

0 comments on commit e707a30

Please sign in to comment.