undefineds

This commit is contained in:
Henry Jameson 2026-08-04 20:33:19 +03:00
commit f16e19d2b2
16 changed files with 25 additions and 25 deletions

View file

@ -11,7 +11,7 @@ import { contrastRatio, convert, invertLightness } from 'chromatism'
* @param {Number} [b] - Blue component
*/
export const rgb2hex = (r, g, b) => {
if (r === null || typeof r === 'undefined') {
if (r === null || r === undefined) {
return undefined
}
// TODO: clean up this mess
@ -130,7 +130,7 @@ export const arithmeticBlend = (origin, value, operator) => {
* @returns {Object} sRGB of resulting color
*/
export const alphaBlend = (fg, fga, bg) => {
if (fga === 1 || typeof fga === 'undefined') {
if (fga === 1 || fga === undefined) {
return fg
}