slate 0.133.1 → 0.133.3

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/dist/index.es.js CHANGED
@@ -4179,9 +4179,13 @@ const insertFragment = (editor, fragment, options = {}) => {
4179
4179
  }
4180
4180
  if (Location.isRange(at)) {
4181
4181
  if (!hanging) {
4182
- at = Editor.unhangRange(editor, at, {
4183
- voids
4184
- });
4182
+ const [, end] = Range.edges(at);
4183
+ const endOfDoc = Editor.end(editor, []);
4184
+ if (!Point.equals(end, endOfDoc)) {
4185
+ at = Editor.unhangRange(editor, at, {
4186
+ voids
4187
+ });
4188
+ }
4185
4189
  }
4186
4190
  if (Range.isCollapsed(at)) {
4187
4191
  at = at.anchor;