Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Mar 28, 2024
1 parent b12c86c commit 94e6f94
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/slate/src/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ export * from './start'
export * from './string'
export * from './unhang-range'
export * from './without-normalizing'
export * from './shouldMergeNodesRemovePrevNode'
export * from './should-merge-nodes-remove-prev-node'
2 changes: 1 addition & 1 deletion packages/slate/src/transforms-node/merge-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const mergeNodes: NodeTransforms['mergeNodes'] = (
// prevent losing formatting when deleting entire nodes when you have a
// hanging selection.
// if prevNode is first child in parent,don't remove it.
if (editor.shouldMergeNodesRemovePrevNode(prev, current)) {
if (Editor.shouldMergeNodesRemovePrevNode(editor, prev, current)) {
Transforms.removeNodes(editor, { at: prevPath, voids })
} else {
editor.apply({
Expand Down

0 comments on commit 94e6f94

Please sign in to comment.