Skip to content

Commit 396ecf7

Browse files
committed
use a error constructor with new
1 parent fc3f7dd commit 396ecf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core-js/internals/does-not-exceed-safe-integer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ var $TypeError = TypeError;
33
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
44

55
module.exports = function (it) {
6-
if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
6+
if (it > MAX_SAFE_INTEGER) throw new $TypeError('Maximum allowed index exceeded');
77
return it;
88
};

0 commit comments

Comments
 (0)