Skip to content

Commit

Permalink
Merge pull request #2 from derivita/ehalsmer/fix-undefined-textfield-…
Browse files Browse the repository at this point in the history
…placeholder

Fix undefined textfield placeholder
  • Loading branch information
ehalsmer committed Jul 9, 2024
2 parents eb09760 + 07dd0fd commit 650a98e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/textfield/textfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
MaterialTextfield.prototype.checkDirty = function() {
if (
(this.input_.value && this.input_.value.length > 0) ||
(this.input_.placeholder.trim() !== '')
(this.input_.placeholder?.trim())
) {
this.element_.classList.add(this.CssClasses_.IS_DIRTY);
} else {
Expand Down

0 comments on commit 650a98e

Please sign in to comment.