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

Error when used with native classes #261

Closed
ssutar opened this issue Nov 29, 2018 · 4 comments
Closed

Error when used with native classes #261

ssutar opened this issue Nov 29, 2018 · 4 comments

Comments

@ssutar
Copy link
Contributor

ssutar commented Nov 29, 2018

When used with ember-native-class-polyfill and ember-decorators, following error is thrown

Uncaught TypeError: Class constructor ComputedProperty cannot be invoked without 'new'
    at new TaskProperty (-task-property.js:398)
    at task (index.js:58)
    at Module.callback (search-input.js:43)
    at Module.exports (loader.js:106)
    at requireModule (loader.js:27)
    at Class._extractDefaultExport (index.js:422)
    at Class.resolveOther (index.js:101)
    at Class.resolve (index.js:163)
    at resolve (container.js:970)
    at Registry.resolve (container.js:600)

Its originated from https://github.com/machty/ember-concurrency/blob/master/addon/-task-property.js#L418

cc: @rwjblue

@rwjblue
Copy link
Contributor

rwjblue commented Nov 29, 2018

I think we could likely migrate to using native classes directly.

Also, to be clear, this will be an issue with Ember 3.6.0+ when IE11 is not being targeted (not just with the polyfill).

@buschtoens
Copy link
Contributor

buschtoens commented Nov 29, 2018

Shameless plug: ember-concurrency-decorators

Edit: just noticed that this not actually about using a task on a native class. In any case, dear Googler, if you want to do that though, the above addon is for you.

ssutar pushed a commit to ssutar/ember-concurrency that referenced this issue Nov 30, 2018
ssutar pushed a commit to ssutar/ember-concurrency that referenced this issue Nov 30, 2018
ssutar pushed a commit to ssutar/ember-concurrency that referenced this issue Nov 30, 2018
@toovy
Copy link

toovy commented Dec 6, 2018

@buschtoens fyi also happens when using ember-concurrency-decorators with the ember-native-class-polyfill

machty pushed a commit that referenced this issue Dec 10, 2018
* Use class syntax for extending from ComputedProperty

Fix for #261

* Add super.setup to make sure the tests pass on ember beta and canary versions
@machty
Copy link
Owner

machty commented Dec 10, 2018

Fix released on 0.8.24

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