Skip to content

Commit

Permalink
Number: wrapConstructor requires true ES5.
Browse files Browse the repository at this point in the history
Fixes part of #365.
  • Loading branch information
ljharb committed Oct 22, 2015
1 parent a60d737 commit 238c77a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ In both browser and node you may also want to include `unorm`; see the [`String.
* `RegExp.prototype`:
* `flags` (requires ES5) ([a standalone shim is also available](https://github.com/es-shims/RegExp.prototype.flags))
* `Number`:
* binary and octal literals: `Number('0b1')` and `Number('0o7')` (requires ES5 property descriptor support)
* `EPSILON`
* `MAX_SAFE_INTEGER`
* `MIN_SAFE_INTEGER`
Expand Down
2 changes: 1 addition & 1 deletion es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@
}, true);
}

if (Number('0o10') !== 8 || Number('0b10') !== 2) {
if (supportsDescriptors && (Number('0o10') !== 8 || Number('0b10') !== 2)) {
var OrigNumber = Number;
var binaryRegex = /^0b/i;
var octalRegex = /^0o/i;
Expand Down

0 comments on commit 238c77a

Please sign in to comment.