Skip to content

Commit

Permalink
Fix for possibly undefined placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
ehalsmer committed Jul 9, 2024
1 parent eb09760 commit 07dd0fd
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 07dd0fd

Please sign in to comment.