Skip to content

Commit

Permalink
fix: the 'select' parameter of the insertNodes function has been over…
Browse files Browse the repository at this point in the history
…ridden (#5562)
  • Loading branch information
YaoKaiLun committed Nov 22, 2023
1 parent 9aa573e commit 91400a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quick-eels-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'slate': patch
---

Fix the 'select' parameter of the insertNodes function has been overridden
4 changes: 3 additions & 1 deletion packages/slate/src/transforms-node/insert-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const insertNodes: NodeTransforms['insertNodes'] = (

if (!at) {
at = getDefaultInsertLocation(editor)
select = true
if (select !== false) {
select = true
}
}

if (select == null) {
Expand Down

0 comments on commit 91400a8

Please sign in to comment.