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

Commit

Permalink
Simplify invalid fire conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Jul 16, 2014
1 parent 389bac5 commit a6359b7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,7 @@

invalidChanged: function() {
this.classList.toggle('invalid', this.invalid);
if (this.invalid) {
this.fire('input-invalid', {value: this.inputValue});
} else {
this.fire('input-valid', {value: this.inputValue});
}
this.fire('input-'+ this.invalid ? 'invalid' : 'valid', {value: this.inputValue});
},

inputValueChanged: function() {
Expand Down

0 comments on commit a6359b7

Please sign in to comment.