Skip to content

Commit

Permalink
coerce branch name to string
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Jan 14, 2020
1 parent 4b09f28 commit 0532b65
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,11 @@ export class DynamicColorProperty extends DynamicStyleProperty {
const mbStops = [];
for (let i = 0; i < stops.length; i++) {
const stop = stops[i];
mbStops.push(stop.stop);
mbStops.push(stop.color);
const branch = `${stop.stop}`;
if (typeof branch === 'string') {
mbStops.push(branch);
mbStops.push(stop.color);
}
}

mbStops.push(defaultColor); //last color is default color
Expand Down

0 comments on commit 0532b65

Please sign in to comment.