Skip to content

Commit 6275054

Browse files
committed
dataparser -- fix 'some' on levels array
return truthy when appropriate, and falsy whjen inappropriate
1 parent af43eb5 commit 6275054

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/DataParsers.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ const gaugeDict = {
2121
function testGood (level, spotMeta) {
2222
let value = 'bad';
2323
spotMeta.levels
24-
.some( function (d) {
24+
.some( d => {
2525
if ( (d[0] < level) && ( level < d[1]) ) {
2626
// console.log(d);
27-
value = d[2]; }
28-
29-
});
27+
value = d[2]; return value }
28+
return false});
3029
// console.log('TESTGOOD', value, spotMeta)
3130
return value
3231
}

0 commit comments

Comments
 (0)