Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Return false immediately from the validate function if this.input is …
Browse files Browse the repository at this point in the history
…not defined.
  • Loading branch information
jklein24 committed Apr 7, 2015
1 parent 8521138 commit 39fbf0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paper-input-decorator.html
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,9 @@
* @return {boolean} True if the input is valid.
*/
validate: function() {
if (!this.input) {
return true;
}
this.isInvalid = !this.input.validity.valid;
return this.input.validity.valid;
},
Expand Down

0 comments on commit 39fbf0e

Please sign in to comment.