croco-html 20.3.1 → 20.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.
@@ -2738,6 +2738,9 @@ class DefaultTags {
2738
2738
  return DefaultTags.tagRenderers.hasOwnProperty(item.tagName);
2739
2739
  }
2740
2740
  static isEditorDefined(tag, options) {
2741
+ if (tag === null || tag === undefined) {
2742
+ return false;
2743
+ }
2741
2744
  const tagName = tag.tagDescription.tag;
2742
2745
  if (options.definedEditorViewRenderers.hasOwnProperty(tagName)) {
2743
2746
  return true;
@@ -3413,6 +3416,7 @@ class MainEditorBlockComponent {
3413
3416
  this.textTags = TextTags.allTextTags;
3414
3417
  this.unsubscribe = new Subject();
3415
3418
  this._cdr = inject(ChangeDetectorRef);
3419
+ this._tag = null;
3416
3420
  this.presentOrEdit = true;
3417
3421
  this.onTagSaved = new EventEmitter();
3418
3422
  this.onTagRemoved = new EventEmitter();
@@ -3426,6 +3430,9 @@ class MainEditorBlockComponent {
3426
3430
  this._tagService.presentOrEdit$.next(false);
3427
3431
  }
3428
3432
  isEditorDefined() {
3433
+ if (this.tag === null || this.tag === undefined) {
3434
+ return false;
3435
+ }
3429
3436
  return DefaultTags.isEditorDefined(this.tag, this._options);
3430
3437
  }
3431
3438
  deleteItem() {