Skip to content

Commit

Permalink
bail if not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed Nov 17, 2023
1 parent ce3d2c5 commit 8a46abc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/tag-list/tag-list-item-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
// don't error immediately in case it doesn't get set immediately
this._validatingPlainTextTimeout = setTimeout(() => {
this._validatingPlainTextTimeout = null;
if (!this.isConnected) return;
const hasPlainText = (this._plainText?.constructor !== String) && this._plainText?.length > 0;
if (!hasPlainText) {
throw new Error(`TagListItemMixin: "${this.tagName.toLowerCase()}" called "_render()" with empty "plainText" option`);
Expand Down

0 comments on commit 8a46abc

Please sign in to comment.