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

Resolved value from hash does not include value from mixin #544

Open
steventsao opened this issue Sep 1, 2019 · 0 comments
Open

Resolved value from hash does not include value from mixin #544

steventsao opened this issue Sep 1, 2019 · 0 comments

Comments

@steventsao
Copy link

steventsao commented Sep 1, 2019

Does hash remove all properties in the prototype besides the resolved value of a promise?

For instance, the resolved promise wrapped in hash does not include the properties from ObjectPromiseProxy. I expect the value from hash to be the same as when the promise is independent.

//util
import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
import ObjectProxy from '@ember/object/proxy';

const ObjectPromiseProxy = ObjectProxy.extend(PromiseProxyMixin);

//route
model() {
  return hash({
    displayValue: ObjectPromiseProxy.create({
        promise: fetchBeyondProfessionalsSettings(store),
    })
  })
}

//component
displayValue.isFulfilled === undefined;

The example above would work if ObjectPromiseProxy is not within hash. Is this an expected behavior?

Thanks.

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

1 participant