Skip to content

Commit 243bf86

Browse files
fix: avoid BigInt literal in closeTo for runtime compat (#1748)
--------- Co-authored-by: James Garbutt <[email protected]>
1 parent d8b0395 commit 243bf86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/chai/core/assertions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3147,7 +3147,7 @@ function closeTo(expected, delta, msg) {
31473147
}
31483148
new Assertion(expected, flagMsg, ssfi, true).is.numeric;
31493149

3150-
const abs = (x) => (x < 0n ? -x : x);
3150+
const abs = (x) => (x < 0 ? -x : x);
31513151

31523152
// Used to round floating point number precision arithmetics
31533153
// See: https://stackoverflow.com/a/3644302

0 commit comments

Comments
 (0)