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

Breaks when used in liquid-outlet #262

Open
buschtoens opened this issue Oct 2, 2019 · 0 comments
Open

Breaks when used in liquid-outlet #262

buschtoens opened this issue Oct 2, 2019 · 0 comments

Comments

@buschtoens
Copy link
Owner

When the helper is used in a route template that is rendered into a liquid-outlet, two templates are rendered at the same time during a transition. One of these templates inevitably does not match the currently active route hierarchy. If this template then expects a certain task to be resolvable, the assertion fails.

Somehow this only started occurring in Ember 3.13.x. in our app, but I don't want to waste time digging deeper.

IMO usage of this addon should be discouraged anyway. I believe route tasks should be returned as part of the model, like so:

class extends Route {
  @task
  *refresh() { ... }

  model() {
    return {
      someData: ...,
      refresh: this.refresh
    };
  }
}
<button {{on "click" (perform @model.refresh)}}>Refresh</button>
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