colorConverter.format: passthru if string and no type given
fixes #408
fixes f7f679bb
This commit is contained in:
parent
361feb90d4
commit
b49254aca2
|
@ -17,7 +17,7 @@ const colorConverter = (() => {
|
|||
};
|
||||
|
||||
function format(color = '', type = color.type, hexUppercase) {
|
||||
if (!color || !type) return '';
|
||||
if (!color || !type) return typeof color === 'string' ? color : '';
|
||||
const a = formatAlpha(color.a);
|
||||
const hasA = Boolean(a);
|
||||
if (type === 'rgb' && color.type === 'hsl') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user