Skip to content

Commit

Permalink
fix(ValueAttributeObserver): notify only when changing element value
Browse files Browse the repository at this point in the history
  • Loading branch information
jdanyow committed Jan 6, 2016
1 parent 1c2e580 commit 6ac4d42
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/element-observation.js
Expand Up @@ -97,10 +97,11 @@ export class ValueAttributeObserver {
}

setValue(newValue) {
this.element[this.propertyName] =
(newValue === undefined || newValue === null) ? '' : newValue;

this.notify();
newValue = newValue === undefined || newValue === null ? '' : newValue;
if (this.element[this.propertyName] !== newValue) {
this.element[this.propertyName] = newValue;
this.notify();
}
}

notify() {
Expand Down

0 comments on commit 6ac4d42

Please sign in to comment.