Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraneous throw: Method Number.prototype.toFixed called on incompatible receiver #{Object} #228

Closed
clavecoder opened this issue Aug 1, 2016 · 5 comments

Comments

@clavecoder
Copy link
Contributor

While debugging with breakpoints for "All Exceptions", i get an extraneous exception in core.js. It would be great if it could be avoided.

I'm using WebPack 2/Babel 6 on a TypeScript 2/NodeJS 6 app...

When loading an NodeJS app, while loading es6.number.to-fixed.js the following TypeError is thrown at the line

  // V8 ~ Android 4.3-
  $toFixed.call({});

however, the app loads and runs successfully.

"TypeError: Method Number.prototype.toFixed called on incompatible receiver #\n at Object.toFixed (native)\n at ...\node_modules\core-js\modules\es6.number.to-fixed.js:64:12\n at module.exports (...\node_modules\core-js\modules_fails.js:3:14)\n at Object. (...\node_modules\core-js\modules\es6.number.to-fixed.js:62:26)\n at Module._compile (module.js:541:32)\n at Object.Module._extensions..js (module.js:550:10)\n at Module.load (module.js:458:32)\n at tryModuleLoad (module.js:417:12)\n at Function.Module._load (module.js:409:3)\n at Module.require (module.js:468:17)"

@kidandcat
Copy link

Same here +1

@ayozebarrera
Copy link

Someone noticed why was this happening? I'm having the same issue at the moment, can't figure out why

@ValeriiMal
Copy link

The same on Safari. It crashes only in Safari. Browser just become reload the page

@ValeriiMal
Copy link

Possible slution:
conditions: Safari and Angular; page reloads after clicking on button that nested to the form element. If there is no [ngSubmit] attribute on the form element try strictly specify the type of the button like

@zloirock
Copy link
Owner

core-js works as should polyfills work - it uses feature detection with possible throwing and catching errors. I don't think that I can't do anything here, it can be improved / fixed only on the side of your engine / debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants