Move fallback to default color to a location where it's accessible (fixes #137)
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ export function getColorForDistanceAndToken(distance, token, ranges=null) {
|
||||
ranges = getRangesFromSpeedProvider(token);
|
||||
}
|
||||
if (ranges.length === 0)
|
||||
return this.color;
|
||||
return null;
|
||||
const currentRange = ranges.reduce((minRange, currentRange) => {
|
||||
if (distance <= currentRange.range && currentRange.range < minRange.range)
|
||||
return currentRange;
|
||||
|
||||
Reference in New Issue
Block a user