Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] to-color should be idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Sep 13, 2018
1 parent 6897ac4 commit d901713
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mbgl/style/expression/coercion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ EvaluationResult toNumber(const Value& v) {

EvaluationResult toColor(const Value& colorValue) {
return colorValue.match(
[&](const Color& color) -> EvaluationResult {
return color;
},
[&](const std::string& colorString) -> EvaluationResult {
const optional<Color> result = Color::parse(colorString);
if (result) {
Expand Down

0 comments on commit d901713

Please sign in to comment.