@junbyeol/tiptap-editor 1.0.5 → 1.0.6

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.

Potentially problematic release.


This version of @junbyeol/tiptap-editor might be problematic. Click here for more details.

package/dist/index.mjs CHANGED
@@ -64,7 +64,7 @@ const um = (e, t, n = !0) => {
64
64
  return t ? t.split(n).map((o) => o.trim()).map((o) => um(o, cm(), r)) : [];
65
65
  }, fa = (e, t) => t?.schema ? t.schema.spec.marks.get(e) !== void 0 : !1, dm = (e, t) => t?.schema ? t.schema.spec.nodes.get(e) !== void 0 : !1;
66
66
  function Ru(e, t) {
67
- if (!e) return !1;
67
+ if (!e || !e.extensionManager) return !1;
68
68
  const n = Array.isArray(t) ? t : [t], r = n.some(
69
69
  (o) => e.extensionManager.extensions.some((i) => i.name === o)
70
70
  );
@@ -4677,11 +4677,11 @@ function Ye(e) {
4677
4677
  }, [r]), yn({
4678
4678
  editor: r ?? n,
4679
4679
  selector(s) {
4680
- return s.editor ? {
4680
+ return !s.editor || s.editor.isDestroyed ? { editor: null, editorState: void 0, canCommand: void 0 } : {
4681
4681
  editor: s.editor,
4682
4682
  editorState: s.editor.state,
4683
4683
  canCommand: s.editor.can
4684
- } : { editor: null, editorState: void 0, canCommand: void 0 };
4684
+ };
4685
4685
  }
4686
4686
  }) ?? { editor: null };
4687
4687
  }