Skip to content

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

Open
@steventsao

Description

@steventsao

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions