fix(Util): remove truthy check before isNaN check (#6358)

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
Nico
2021-08-10 16:14:41 -04:00
committed by GitHub
parent 2a3e819fcf
commit 3c17939fd5

View File

@@ -470,7 +470,7 @@ class Util extends null {
}
if (color < 0 || color > 0xffffff) throw new RangeError('COLOR_RANGE');
else if (color && isNaN(color)) throw new TypeError('COLOR_CONVERT');
else if (Number.isNaN(color)) throw new TypeError('COLOR_CONVERT');
return color;
}