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

convert-prototype-extensions doesn't work with spread operators #19

Closed
johnhamelink opened this issue Mar 30, 2015 · 2 comments
Closed

Comments

@johnhamelink
Copy link

Hey there 😄
I have a model which uses a spread operator to dynamically define which attributes should be required for a property. Here's a watered down example which shows the usecase I'm referring to:

import DS from 'ember-data';

var attrs = ['lorem', 'ipsum', 'dolor'];
export default DS.Model.extend({
    filledIn: Ember.computed(...attrs, function(){
        attrs.forEach(function(item){
            console.log(item);
        });
    });
});

Now, ember-watson will happily convert from property to decorator style, but it breaks when reading through the finished result afterwards:

Oh Dear! I wasn't able to save the following files:
app/models/register.js

A possible cause is having all the source code commented.
If that's not the problem please fill a report with the hospital directors
at https://github.com/abuiles/ember-watson/issues.
@stefanpenner
Copy link
Collaborator

dupe of: #15

@stefanpenner
Copy link
Collaborator

I stole your more succinct issue name.

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

2 participants