@seafile/sdoc-editor 0.4.14 → 0.4.15
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.
|
@@ -114,6 +114,7 @@ const withImage = editor => {
|
|
|
114
114
|
const point = Editor.before(editor, selection, {
|
|
115
115
|
distance: 2
|
|
116
116
|
});
|
|
117
|
+
if (!point) return;
|
|
117
118
|
const [node, path] = Editor.node(editor, [point.path[0], point.path[1]]);
|
|
118
119
|
const isPerviousNodeImage = node.type === IMAGE;
|
|
119
120
|
if (isPerviousNodeImage && Range.isCollapsed(selection) && isBlockAboveEmpty(editor) && !Path.isCommon(path, selection.anchor.path)) {
|