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

Number.parseInt(offset, 10) not a function #50

Open
Syzygy24 opened this issue Feb 7, 2017 · 6 comments
Open

Number.parseInt(offset, 10) not a function #50

Syzygy24 opened this issue Feb 7, 2017 · 6 comments

Comments

@Syzygy24
Copy link

Syzygy24 commented Feb 7, 2017

I'm using your module through ember-light-table, and I'm getting this error when testing through phantomjs: "TypeError: undefined is not a function (evaluating 'Number.parseInt(offset, 10)')", at the function call here.

I'm not sure what would cause Number.parseInt() to be undefined.

@Syzygy24
Copy link
Author

Syzygy24 commented Feb 7, 2017

Switching to the global isNaN and global parseInt from the Number one fixes my problem. I have a PR here.
#51

@Syzygy24
Copy link
Author

Syzygy24 commented Feb 7, 2017

I'm on phantom 2.1.1
I'll take a look at the babel stuff

@dknutsen
Copy link

I'm running into this now too, any ideas on a fix/workaround?

@alexander-alvarez
Copy link
Contributor

@offirgolan we can merge #51 or downstream people can do the babel polyfill fix above for testing.

I'm not sure what the attitude is for Ember & addons w.r.t browser compatability.

@dknutsen
Copy link

I'm a noob, after some more digging I got the polyfill working fine. If anyone else is looking for a solution to this just put the following in your ember-cli-build.js:

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    "ember-cli-babel": {
      includePolyfill: true,
    },
...
  });
...
});

Obviously this could still be fixed via the PR but FWIW I'm totally fine with the polyfill solution.

This was referenced Mar 28, 2017
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

3 participants