Skip to content

Commit

Permalink
unnecessary check ?
Browse files Browse the repository at this point in the history
  • Loading branch information
2wheeh committed Jul 17, 2024
1 parent 2d4c311 commit 0f7b95d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/lexical/src/LexicalSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,6 @@ export class RangeSelection implements BaseSelection {
const blocksParent = $wrapInlineNodes(nodes);
const nodeToSelect = blocksParent.getLastDescendant()!;
const blocks = blocksParent.getChildren();
const isLI = (node: LexicalNode) =>
'__value' in node && '__checked' in node;
const isMergeable = (node: LexicalNode): node is ElementNode =>
$isElementNode(node) &&
INTERNAL_$isBlock(node) &&
Expand Down Expand Up @@ -1284,7 +1282,7 @@ export class RangeSelection implements BaseSelection {
if (
insertedParagraph &&
$isElementNode(lastInsertedBlock) &&
(isLI(insertedParagraph) || INTERNAL_$isBlock(lastToInsert))
INTERNAL_$isBlock(lastToInsert)
) {
lastInsertedBlock.append(...insertedParagraph.getChildren());
insertedParagraph.remove();
Expand Down

0 comments on commit 0f7b95d

Please sign in to comment.