Skip to content

Commit

Permalink
Merge pull request #5 from rkunev/fix/initial-color
Browse files Browse the repository at this point in the history
Fix/initial color
  • Loading branch information
talamaska authored Feb 28, 2017
2 parents 771ea87 + 6ef898a commit 4cab598
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/color-picker.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
}

function $onChanges() {
if (this.color) {
if (this.color && 'red' in this.color && 'green' in this.color && 'blue' in this.color) {
this.angle = ColorPickerService.rgbToHsl(this.color.red, this.color.green, this.color.blue).hue;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/color-picker.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
}

function $onChanges() {
if (this.color) {
if (this.color && 'red' in this.color && 'green' in this.color && 'blue' in this.color) {
this.angle = ColorPickerService.rgbToHsl(this.color.red, this.color.green, this.color.blue).hue;
}
}
Expand Down

0 comments on commit 4cab598

Please sign in to comment.