Skip to content

Commit 414598a

Browse files
committed
Bug #91 setDirty being called on instantiation
1 parent 613fa5c commit 414598a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class AngularColorPickerController {
4646

4747
this.$scope.control[0].$setValidity(this.$element.attr('name'), this.isValid);
4848

49-
if (oldValue !== undefined && typeof this.$scope.control[0].$setDirty === 'function') {
49+
if (newValue !== oldValue && oldValue !== undefined && typeof this.$scope.control[0].$setDirty === 'function') {
5050
this.$scope.control[0].$setDirty();
5151
}
5252
} else {

0 commit comments

Comments
 (0)