@tiptap/core 3.0.9 → 3.2.0

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.cjs CHANGED
@@ -4487,7 +4487,6 @@ var Editor = class extends EventEmitter {
4487
4487
  * Remove the editor from the DOM, but still allow remounting at a different point in time
4488
4488
  */
4489
4489
  unmount() {
4490
- var _a;
4491
4490
  if (this.editorView) {
4492
4491
  const dom = this.editorView.dom;
4493
4492
  if (dom == null ? void 0 : dom.editor) {
@@ -4497,7 +4496,17 @@ var Editor = class extends EventEmitter {
4497
4496
  }
4498
4497
  this.editorView = null;
4499
4498
  this.isInitialized = false;
4500
- (_a = this.css) == null ? void 0 : _a.remove();
4499
+ if (this.css) {
4500
+ try {
4501
+ if (typeof this.css.remove === "function") {
4502
+ this.css.remove();
4503
+ } else if (this.css.parentNode) {
4504
+ this.css.parentNode.removeChild(this.css);
4505
+ }
4506
+ } catch (error) {
4507
+ console.warn("Failed to remove CSS element:", error);
4508
+ }
4509
+ }
4501
4510
  this.css = null;
4502
4511
  }
4503
4512
  /**