{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10739","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10739/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10739/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10739/events","html_url":"https://github.com/emberjs/ember.js/issues/10739","id":64792436,"number":10739,"title":"{{component}} helper race condition with associated model","user":{"login":"trentmwillis","id":3526753,"avatar_url":"https://avatars.githubusercontent.com/u/3526753?v=3","gravatar_id":"","url":"https://api.github.com/users/trentmwillis","html_url":"https://github.com/trentmwillis","followers_url":"https://api.github.com/users/trentmwillis/followers","following_url":"https://api.github.com/users/trentmwillis/following{/other_user}","gists_url":"https://api.github.com/users/trentmwillis/gists{/gist_id}","starred_url":"https://api.github.com/users/trentmwillis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentmwillis/subscriptions","organizations_url":"https://api.github.com/users/trentmwillis/orgs","repos_url":"https://api.github.com/users/trentmwillis/repos","events_url":"https://api.github.com/users/trentmwillis/events{/privacy}","received_events_url":"https://api.github.com/users/trentmwillis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-03-27T16:01:21Z","updated_at":"2015-04-05T12:43:11Z","closed_at":null,"body":"The `{{component}}` helper seems to have a race condition that is causing problems to surface in tests that I am writing.\r\n\r\nUsage is like so:\r\n\r\n```handlebars\r\n{{component card.componentType model=card}}\r\n```\r\n\r\nThen when tests are run, a failure occurs during the `afterEach` when `destroy` is run on the `application` instance.\r\n\r\n![screen shot 2015-03-27 at 8 56 31 am](https://cloud.githubusercontent.com/assets/3526753/6871363/3ba316d2-d45f-11e4-9dc5-2a58f2e54968.png)\r\n\r\nIf I change the above usage to use a static string rather than a model property like so:\r\n\r\n```handlebars\r\n{{component `card/my-type` model=card}}\r\n```\r\n\r\nThe tests and teardown are fine. This leads me to believe it's being caused by the model being destroyed before the component, resulting in the component having a type of `undefined`.\r\n\r\nPotentially related PR, [#10302](https://github.com/emberjs/ember.js/pull/10302)"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/89764328","html_url":"https://github.com/emberjs/ember.js/issues/10739#issuecomment-89764328","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10739","id":89764328,"user":{"login":"trentmwillis","id":3526753,"avatar_url":"https://avatars.githubusercontent.com/u/3526753?v=3","gravatar_id":"","url":"https://api.github.com/users/trentmwillis","html_url":"https://github.com/trentmwillis","followers_url":"https://api.github.com/users/trentmwillis/followers","following_url":"https://api.github.com/users/trentmwillis/following{/other_user}","gists_url":"https://api.github.com/users/trentmwillis/gists{/gist_id}","starred_url":"https://api.github.com/users/trentmwillis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentmwillis/subscriptions","organizations_url":"https://api.github.com/users/trentmwillis/orgs","repos_url":"https://api.github.com/users/trentmwillis/repos","events_url":"https://api.github.com/users/trentmwillis/events{/privacy}","received_events_url":"https://api.github.com/users/trentmwillis/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T12:43:11Z","updated_at":"2015-04-05T12:43:11Z","body":"A thought, since isDestroying is not set on the stream, would it be possible to check for it on the container? I feel like that would be a simple solution until glimmer lands"}}