Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit f3d3490

Browse files
niveditcfacebook-github-bot
authored andcommitted
Tree Data - Don't update pointers if range is within the same block
Summary: Fixes a bug where we were trying to fix/update block pointers even when nothing changed across blocks. Pair programmed with @[22701560:flarnie] :) Reviewed By: mitermayer Differential Revision: D9129494 fbshipit-source-id: 5b935371d30bdaa87849313ccd2c3c0f5be9facd
1 parent 99eca6b commit f3d3490

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/model/transaction/removeRangeFromContentState.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ const removeRangeFromContentState = (
307307

308308
let updatedBlockMap = blockMap.merge(newBlocks).filter(block => !!block);
309309

310-
if (isExperimentalTreeBlock) {
310+
// Only update tree block pointers if the range is across blocks
311+
if (isExperimentalTreeBlock && startBlock !== endBlock) {
311312
updatedBlockMap = updateBlockMapLinks(
312313
updatedBlockMap,
313314
startBlock,

0 commit comments

Comments
 (0)