Skip to content

Commit

Permalink
Revert "fix invariant"
Browse files Browse the repository at this point in the history
This reverts commit a9ac9cd.
  • Loading branch information
GermanJablo committed Nov 24, 2023
1 parent f15465f commit 256867e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/lexical/src/LexicalNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,12 +981,10 @@ export class LexicalNode {
let current = firstToInsert;
const nodestToInsert = [firstToInsert];
while (current !== lastToInsert2) {
if (!current.getNextSibling()) {
invariant(
false,
'insertRangeAfter: lastToInsert must be a later sibling of firstToInsert',
);
}
invariant(
!current.getNextSibling(),
'insertRangeAfter: lastToInsert must be a later sibling of firstToInsert',
);
current = current.getNextSibling()!;
nodestToInsert.push(current);
}
Expand Down

0 comments on commit 256867e

Please sign in to comment.