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

[bugfix] Handle super calls in CP - WIP #18

Merged
merged 1 commit into from
May 30, 2019

Conversation

ssutar
Copy link

@ssutar ssutar commented May 16, 2019

This PR fix the issue to handle _super calls in CP

For example in below code

const Foo = EmberObject.extend({
      first: "rob",
      last: "jackson",

      fullName: computed("first", "last", function() {
        return `${this.first} ${this.last}`;
      })
    });

    const Bar = Foo.extend({
      githubAlias: "rwjblue",
      fullName: computed("githubAlias", function() {
        const fullName = this._super();
        return `${fullName} [ ${this.githubAlias} ]`;
      })
    });

    let obj = Bar.create();
    const fullName = get(obj, "fullName");

The fullName is undefined [ rwjblue ] whereas it should be rob jackson [ rwjblue ]

@ssutar ssutar force-pushed the computed_super branch 4 times, most recently from f2f2b69 to 11114d3 Compare May 22, 2019 19:49
@ssutar
Copy link
Author

ssutar commented May 28, 2019

This will fix the issue #15

@pzuraq
Copy link
Collaborator

pzuraq commented May 30, 2019

Tests are passing but Travis never reported back, going to merge

@pzuraq pzuraq merged commit e74676e into ember-polyfills:master May 30, 2019
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

Successfully merging this pull request may close these issues.

2 participants