prosemirror-transform 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.3.2 (2021-04-06)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a regression in `dropPoint` that caused it to dereference undefined in some circumstances.
6
+
1
7
  ## 1.3.1 (2021-04-01)
2
8
 
3
9
  ### Bug fixes
package/dist/index.es.js CHANGED
@@ -909,7 +909,7 @@ function dropPoint(doc, pos, slice) {
909
909
  fits = parent.canReplace(insertPos, insertPos, content);
910
910
  } else {
911
911
  var wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);
912
- fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0].type);
912
+ fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);
913
913
  }
914
914
  if (fits)
915
915
  { return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1) }