{"action":"created","issue":{"url":"https://api.github.com/repos/ember-intl/ember-intl/issues/475","repository_url":"https://api.github.com/repos/ember-intl/ember-intl","labels_url":"https://api.github.com/repos/ember-intl/ember-intl/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/ember-intl/ember-intl/issues/475/comments","events_url":"https://api.github.com/repos/ember-intl/ember-intl/issues/475/events","html_url":"https://github.com/ember-intl/ember-intl/issues/475","id":215674084,"number":475,"title":"Regression - Failing with no locale","user":{"login":"hell03610","id":581607,"avatar_url":"https://avatars0.githubusercontent.com/u/581607?v=3","gravatar_id":"","url":"https://api.github.com/users/hell03610","html_url":"https://github.com/hell03610","followers_url":"https://api.github.com/users/hell03610/followers","following_url":"https://api.github.com/users/hell03610/following{/other_user}","gists_url":"https://api.github.com/users/hell03610/gists{/gist_id}","starred_url":"https://api.github.com/users/hell03610/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hell03610/subscriptions","organizations_url":"https://api.github.com/users/hell03610/orgs","repos_url":"https://api.github.com/users/hell03610/repos","events_url":"https://api.github.com/users/hell03610/events{/privacy}","received_events_url":"https://api.github.com/users/hell03610/received_events","type":"User","site_admin":false},"labels":[{"id":171077005,"url":"https://api.github.com/repos/ember-intl/ember-intl/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"jasonmit","id":3108309,"avatar_url":"https://avatars2.githubusercontent.com/u/3108309?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmit","html_url":"https://github.com/jasonmit","followers_url":"https://api.github.com/users/jasonmit/followers","following_url":"https://api.github.com/users/jasonmit/following{/other_user}","gists_url":"https://api.github.com/users/jasonmit/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmit/subscriptions","organizations_url":"https://api.github.com/users/jasonmit/orgs","repos_url":"https://api.github.com/users/jasonmit/repos","events_url":"https://api.github.com/users/jasonmit/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmit/received_events","type":"User","site_admin":false},"assignees":[{"login":"jasonmit","id":3108309,"avatar_url":"https://avatars2.githubusercontent.com/u/3108309?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmit","html_url":"https://github.com/jasonmit","followers_url":"https://api.github.com/users/jasonmit/followers","following_url":"https://api.github.com/users/jasonmit/following{/other_user}","gists_url":"https://api.github.com/users/jasonmit/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmit/subscriptions","organizations_url":"https://api.github.com/users/jasonmit/orgs","repos_url":"https://api.github.com/users/jasonmit/repos","events_url":"https://api.github.com/users/jasonmit/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmit/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-03-21T09:24:21Z","updated_at":"2017-03-26T09:33:44Z","closed_at":"2017-03-26T09:23:36Z","body":"I have many integration tests of components that use ember-intl for translations.\r\nI was using ember-intl 2.18.0 and I was not setting the locale in the tests, as we are not testing the translations, and ignoring the \"missing translation\" messages with a configuration in the tests.\r\n\r\nHowever, when updating to latest version 2.24.0, the tests fail when trying to fetch the locale.\r\nFailure message is\r\n\r\n```\r\nTypeError: Cannot read property 'length' of null\r\n    at Class.lookup (default.js:69)\r\n    at Class.lookup (intl.js:154)\r\n    at Class.getValue (format-message.js:57)\r\n    at Class.compute (-format-base.js:67)\r\n```\r\n\r\nThe new `lookup` method (former `findTranslationByKey`) does not always return an array, but it returns a null when no `localeName` is passed as parameter and no inner `_locale` is set.\r\n\r\nhttps://github.com/ember-intl/ember-intl/blob/dd2a90b2ccf94000a92394565d048c42089aef9b/addon/services/intl.js#L153\r\n\r\nWould it be ok for `_localeWithDefault` to return an array in all cases, so the library works even if no locale is set?\r\n\r\n- [x] I am on the [latest](https://github.com/jasonmit/ember-intl/releases/latest) ember-intl version\r\n- [x] I have searched the [issues](https://github.com/jasonmit/ember-intl/issues) of this repo and believe that this is not a duplicate\r\n\r\n### Environment\r\n\r\n- Ember Version: 2.11\r\n- Ember CLI Version: 2.11\r\n- Ember Intl Version: 2.18 - 2.24\r\n- Browser(s): not related\r\n- Node Version: 6.5\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ember-intl/ember-intl/issues/comments/289268884","html_url":"https://github.com/ember-intl/ember-intl/issues/475#issuecomment-289268884","issue_url":"https://api.github.com/repos/ember-intl/ember-intl/issues/475","id":289268884,"user":{"login":"jasonmit","id":3108309,"avatar_url":"https://avatars2.githubusercontent.com/u/3108309?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmit","html_url":"https://github.com/jasonmit","followers_url":"https://api.github.com/users/jasonmit/followers","following_url":"https://api.github.com/users/jasonmit/following{/other_user}","gists_url":"https://api.github.com/users/jasonmit/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmit/subscriptions","organizations_url":"https://api.github.com/users/jasonmit/orgs","repos_url":"https://api.github.com/users/jasonmit/repos","events_url":"https://api.github.com/users/jasonmit/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmit/received_events","type":"User","site_admin":false},"created_at":"2017-03-26T09:33:44Z","updated_at":"2017-03-26T09:33:44Z","body":"Fixes in 2.24.2, thanks for pointing out the issue"}}
{"actor":{"display_login":"jasonmit"}}