Skip to content

Commit feda0d5

Browse files
committed
Ignore numeric color format
1 parent 39e2d6c commit feda0d5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib/gl_format_color.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function calculateColor(colorIn, opacityIn) {
2525
}
2626

2727
function validateColor(colorIn) {
28-
return rgba(colorIn) || colorDfltRgba;
28+
return isNumeric(colorIn) ? colorDfltRgba : (rgba(colorIn) || colorDfltRgba);
2929
}
3030

3131
function validateOpacity(opacityIn) {
@@ -50,9 +50,7 @@ function formatColor(containerIn, opacityIn, len) {
5050
);
5151
}
5252
else {
53-
sclFunc = function(c) {
54-
return c;
55-
};
53+
sclFunc = validateColor;
5654
}
5755

5856
if(isArrayColorIn) {

0 commit comments

Comments
 (0)