Merge pull request #64 from phoenix-meadowlark/patch-1

Provides consistent cross-browser sorting behavior.
master
Mike Bryant 5 years ago committed by GitHub
commit f8cf8058a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -654,7 +654,15 @@ function analyze_possibilities(sell_prices, first_buy, previous_pattern) {
poss.weekMax = Math.max(...weekMaxes);
}
generated_possibilities.sort((a, b) => a.weekMax < b.weekMax);
generated_possibilities.sort((a, b) => {
if (a.weekMax < b.weekMax) {
return 1;
} else if (a.weekMax > b.weekMax) {
return -1;
} else {
return 0;
}
});
return generated_possibilities;
}

Loading…
Cancel
Save