Remove color from value type in equal operator

This commit is contained in:
Seba Kerckhof
2021-07-28 09:26:29 +02:00
parent 25af938a83
commit fec6fee83c

View File

@@ -606,11 +606,9 @@ function getEqualOperator(operator) {
);
}
if (type === (ValueTypes.COLOR | ValueTypes.STRING)) {
// It's not possible to compare attributes with color values
// So force it to be treated as a string
type = ValueTypes.STRING;
}
// Since it's not possible to have color types here, we can leave it out
// This fixes issues in case the value type is ambiguously detected as a color (e.g. the string 'red')
type = type ^ ValueTypes.COLOR;
return `(${expressionToGlsl(
context,