Use strict equality in darkenColor()

This commit is contained in:
Tony Xia
2019-04-12 23:33:08 +10:00
parent 6730f71074
commit 818d1261b0
@@ -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;