Skip to content

Commit

Permalink
tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed May 28, 2020
1 parent cb16a60 commit 69f9161
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function extractColorFromStyleProperty(
}

const palette = getColorPalette(dynamicOptions.colorCategory);
return palette ? palette[0] : null;
return palette ? palette[0] : defaultColor;
} else {
// return middle of gradient for dynamic style property
if (dynamicOptions.useCustomColorRamp) {
Expand All @@ -58,6 +58,7 @@ export function extractColorFromStyleProperty(
if (!dynamicOptions.color) {
return defaultColor;
}
return getColorRampCenterColor(dynamicOptions.color);
const centerColor = getColorRampCenterColor(dynamicOptions.color);
return centerColor ? centerColor : defaultColor;
}
}

0 comments on commit 69f9161

Please sign in to comment.