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 release] Prevent errors in ember-engines + 3.1 + proxies. #16613

Merged
merged 1 commit into from
May 8, 2018

Commits on May 4, 2018

  1. [BUGFIX release] Prevent errors in ember-engines + 3.1 + proxies.

    Setup:
    
    * In Ember 3.1 any service that has an `unknownProperty` method will
    trigger an assertion if properties are accessed directly and the
    `unknownProperty` implementation does not return `undefined` (which is
    commonly true for things like "features" service which always returns
    true or false).
    
    * Ember Engines registers any service instances from the host app into
    the engines container (with `instantiate: false` set). This is the
    mechanism by which `engineDependencies` works.
    
    * When a service is looked up (regardless of `instantiate: false`) the
    container looks for and calls the `_onLookup` method so that the class
    can validate all of its injections.
    
    Combining these two pieces means that any engines with an
    `engineDependencies` provided service that has an `unknownProperty`
    will throw an error when the service is looked up.
    rwjblue committed May 4, 2018
    Configuration menu
    Copy the full SHA
    b369d1c View commit details
    Browse the repository at this point in the history