Skip to content

Commit

Permalink
refactor(adjustHue): remove redundant %
Browse files Browse the repository at this point in the history
Since the % operation is already performed inside `hslToRgb()` in `src/internalHelpers/_hslToRgb.js`
(which `adjustHue()` eventually calls through `toColorString()`), this % is completely redundant.

refactor styled-components#437
  • Loading branch information
davidde committed May 12, 2019
1 parent 0ff9177 commit 1662a30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/color/adjustHue.js
Expand Up @@ -32,7 +32,7 @@ function adjustHue(degree: number | string, color: string): string {
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
hue: (hslColor.hue + parseFloat(degree)) % 360,
hue: hslColor.hue + parseFloat(degree),
})
}

Expand Down

0 comments on commit 1662a30

Please sign in to comment.