if ( color && Array.isArray( color ) && color.length === 3 ) {
return color;
}
+ if ( typeof color !== 'string' ) {
+ return undefined;
+ }
// Look for rgb(num,num,num)
// eslint-disable-next-line no-cond-assign
}
// Otherwise, we're most likely dealing with a named color
- return $.colorUtil.colors[ $.trim( color ).toLowerCase() ];
+ return $.colorUtil.colors[ color.trim().toLowerCase() ];
},
/**