Skip to content

Commit

Permalink
fix: use hasHelperText
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Oct 3, 2021
1 parent d240667 commit 8ea445d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/field-base/src/field-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,18 @@ export const FieldMixin = (superclass) =>
_helperTextChanged(helperText) {
let helper = this._helperNode;

const hasHelper = this.__isNotEmpty(helperText);
const hasHelperText = this.__isNotEmpty(helperText);
if (hasHelperText && !helper) {
// Create helper lazily
helper = this.__attachDefaultHelper();
}
}

// Only set text content for default helper
if (helper && helper === this.__defaultHelper) {
helper.textContent = helperText;
}

this.__toggleHasHelper(hasHelper);
this.__toggleHasHelper(hasHelperText);
}

/** @protected */
Expand Down

0 comments on commit 8ea445d

Please sign in to comment.