{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/i18n/issues/234","repository_url":"https://api.github.com/repos/aurelia/i18n","labels_url":"https://api.github.com/repos/aurelia/i18n/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/i18n/issues/234/comments","events_url":"https://api.github.com/repos/aurelia/i18n/issues/234/events","html_url":"https://github.com/aurelia/i18n/issues/234","id":257188955,"number":234,"title":"Cannot read property 'indexOf' of undefined at RelativeTime.setup, key is undefined (WEBPACK)","user":{"login":"fracz","id":3918865,"avatar_url":"https://avatars0.githubusercontent.com/u/3918865?v=4","gravatar_id":"","url":"https://api.github.com/users/fracz","html_url":"https://github.com/fracz","followers_url":"https://api.github.com/users/fracz/followers","following_url":"https://api.github.com/users/fracz/following{/other_user}","gists_url":"https://api.github.com/users/fracz/gists{/gist_id}","starred_url":"https://api.github.com/users/fracz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fracz/subscriptions","organizations_url":"https://api.github.com/users/fracz/orgs","repos_url":"https://api.github.com/users/fracz/repos","events_url":"https://api.github.com/users/fracz/events{/privacy}","received_events_url":"https://api.github.com/users/fracz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-12T21:26:43Z","updated_at":"2017-09-13T08:20:35Z","closed_at":null,"author_association":"NONE","body":"**I'm submitting a bug report**\r\n* **Library Version:**\r\n1.6.2\r\n\r\n**Please tell us about your environment:**\r\nWebpack 3.5.6, aurelia-webpack-plugin: 2.0.0-rc5\r\n\r\n* **Browser:**\r\nall\r\n\r\n* **Language:**\r\nTypeScript 2.4.1\r\n\r\n**Current behavior:**\r\nI'm trying to migrate an existing JSPM-based Aurelia app to webpack and I can't get rid of the following error from JS console in Chrome:\r\n\r\n```\r\nUnhandled rejection TypeError: Cannot read property 'indexOf' of undefined\r\n    at RelativeTime.setup (webpack-internal:///152:38:21)\r\n    at eval (webpack-internal:///152:25:13)\r\n```\r\n\r\nor in Firefox:\r\n\r\n```\r\nUnhandled rejection TypeError: key is undefined\r\n    setup@webpack-internal:///152:38:1\r\n    RelativeTime/<@webpack-internal:///152:25:7\r\n```\r\n\r\nThe error comes from [this line](https://github.com/aurelia/i18n/blob/fa64f3e80130942b4fffd67632af06070b6bf1fe/src/relativeTime.js#L25).\r\n\r\nI am using i18next-xhr-backend as suggested in https://github.com/aurelia/i18n/issues/221 and my translations are loaded correctly. However, immediately after the translations are loaded, the above error shows up in the console.\r\n\r\nIt's really hard to reproduce this outside my app so I'm hoping for a clue what I might have misconfigured.\r\n\r\nThe configuration of i18n is as follows:\r\n\r\n```\r\nimport * as I18nBackend from \"i18next-xhr-backend\";\r\nimport {I18N, TCustomAttribute} from \"aurelia-i18n\";\r\n// ...\r\n.plugin('aurelia-i18n', (instance) => {\r\n        const aliases = ['t'];\r\n        TCustomAttribute.configureAliases(aliases);\r\n        instance.i18next.use(I18nBackend );\r\n        return instance.setup({\r\n          backend: {\r\n            loadPath: '/res/locales/{{lng}}/{{lng}}_{{ns}}.json',\r\n          },\r\n          preload: ['de', 'en'],\r\n          fallbackLng: ['en'],\r\n          ns: ['generic', 'validation', 'nav'],\r\n          defaultNS: 'generic',\r\n          attributes: aliases,\r\n          nsSeparator: '::',\r\n          keySeparator: '//',\r\n          interpolation: {\r\n            capitalized: str => str.charAt(0).toUpperCase() + str.slice(1)\r\n          },\r\n          debug: true\r\n        });\r\n      });\r\n```"},"comment":{"url":"https://api.github.com/repos/aurelia/i18n/issues/comments/329094479","html_url":"https://github.com/aurelia/i18n/issues/234#issuecomment-329094479","issue_url":"https://api.github.com/repos/aurelia/i18n/issues/234","id":329094479,"user":{"login":"zewa666","id":2861414,"avatar_url":"https://avatars0.githubusercontent.com/u/2861414?v=4","gravatar_id":"","url":"https://api.github.com/users/zewa666","html_url":"https://github.com/zewa666","followers_url":"https://api.github.com/users/zewa666/followers","following_url":"https://api.github.com/users/zewa666/following{/other_user}","gists_url":"https://api.github.com/users/zewa666/gists{/gist_id}","starred_url":"https://api.github.com/users/zewa666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zewa666/subscriptions","organizations_url":"https://api.github.com/users/zewa666/orgs","repos_url":"https://api.github.com/users/zewa666/repos","events_url":"https://api.github.com/users/zewa666/events{/privacy}","received_events_url":"https://api.github.com/users/zewa666/received_events","type":"User","site_admin":false},"created_at":"2017-09-13T08:20:35Z","updated_at":"2017-09-13T08:20:35Z","author_association":"MEMBER","body":"Please try adding the `lng` property to your plugin options to define the default locale. That might help"}}
{"actor":{"display_login":"zewa666"}}