Use strict equality in darkenColor()

pull/72211/head
Tony Xia 2019-04-12 23:33:08 +10:00
parent 6730f71074
commit 818d1261b0
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ function darkenColor(color) {
for (let i = 1; i < 7; i += 2) {
let newVal = Math.round(parseInt('0x' + color.substr(i, 2), 16) * 0.9);
let hex = newVal.toString(16);
if (hex.length == 1) {
if (hex.length === 1) {
res += '0';
}
res += hex;