From df98cb9c7b528b7ac35ca01cd0f6493d980f083f Mon Sep 17 00:00:00 2001 From: orangemug Date: Sat, 4 Apr 2020 10:21:58 +0100 Subject: [PATCH] Fix layer color swatch in --- src/components/map/FeatureLayerPopup.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/map/FeatureLayerPopup.jsx b/src/components/map/FeatureLayerPopup.jsx index 550c335b..ce434ab3 100644 --- a/src/components/map/FeatureLayerPopup.jsx +++ b/src/components/map/FeatureLayerPopup.jsx @@ -66,7 +66,7 @@ class FeatureLayerPopup extends React.Component { color = styleFunction.convertFunction(color, propertySpec); } - const exprResult = expression.createExpression(color, propertySpec); + const exprResult = expression.createExpression(String(color), propertySpec); const val = exprResult.value.evaluate({ zoom: zoom }, feature); @@ -84,7 +84,7 @@ class FeatureLayerPopup extends React.Component { // This is quite complex, just incase there's an edgecase we're missing // always return black if we get an unexpected error. catch (err) { - console.error("Unable to get feature color, error:", err); + console.warn("Unable to get feature color, error:", err); return "black"; } }