2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-05 23:53:27 +00:00

Fixed BigNumber/XRegExp incompatibility. CLoses #481

This commit is contained in:
n1474335
2019-02-08 16:54:04 +00:00
parent f48af97ddc
commit d2b4c40357
10 changed files with 36 additions and 17 deletions

View File

@@ -43,7 +43,7 @@ class Mean extends Operation {
*/
run(input, args) {
const val = mean(createNumArray(input, args[0]));
return val instanceof BigNumber ? val : new BigNumber(NaN);
return BigNumber.isBigNumber(val) ? val : new BigNumber(NaN);
}
}