{"action":"created","issue":{"url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl/issues/49","repository_url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl","labels_url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl/issues/49/comments","events_url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl/issues/49/events","html_url":"https://github.com/yahoo/babel-plugin-react-intl/issues/49","id":152036654,"number":49,"title":"messagesObj.get(...).map is not a function AGAIN","user":{"login":"dnutels","id":1825272,"avatar_url":"https://avatars.githubusercontent.com/u/1825272?v=3","gravatar_id":"","url":"https://api.github.com/users/dnutels","html_url":"https://github.com/dnutels","followers_url":"https://api.github.com/users/dnutels/followers","following_url":"https://api.github.com/users/dnutels/following{/other_user}","gists_url":"https://api.github.com/users/dnutels/gists{/gist_id}","starred_url":"https://api.github.com/users/dnutels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnutels/subscriptions","organizations_url":"https://api.github.com/users/dnutels/orgs","repos_url":"https://api.github.com/users/dnutels/repos","events_url":"https://api.github.com/users/dnutels/events{/privacy}","received_events_url":"https://api.github.com/users/dnutels/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-30T15:32:20Z","updated_at":"2016-05-02T22:50:52Z","closed_at":null,"body":"It seems to me there is some fishy parsing going on....\r\n\r\n> I don't think https://github.com/yahoo/babel-plugin-react-intl/issues/16 is fixed, BTW.\r\n\r\n**.babelrc**\r\n\r\n```\r\n{\r\n    \"plugins\": [\r\n        [\"react-intl\", {\r\n            \"messagesDir\": \"./dist/i18n/\",\r\n            \"enforceDescriptions\": true\r\n        }]\r\n    ]\r\n}\r\n```\r\n\r\n**If I do this:**\r\n\r\n```\r\nimport {defineMessages} from 'react-intl';\r\n\r\nconst messages = defineMessages({\r\n    anotherText: {\r\n        id: 'anotherText',\r\n        description: 'Some Text',\r\n        defaultMessage: 'Some Text with {title}!'\r\n    },\r\n    yetAnotherText: {\r\n        id: 'yetAnotherText',\r\n        description: 'Yet Another Text',\r\n        defaultMessage: 'Yet Another Text with {title}!'\r\n    }        \r\n});\r\n\r\nconsole.log(messages);\r\n```\r\n\r\neverything works absolutely fine.\r\n\r\n**If I do this:**\r\n\r\n```\r\nimport {defineMessages} from 'react-intl';\r\n\r\nconst messages = {\r\n    anotherText: {\r\n        id: 'anotherText',\r\n        description: 'Some Text',\r\n        defaultMessage: 'Some Text with {title}!'\r\n    },\r\n    yetAnotherText: {\r\n        id: 'yetAnotherText',\r\n        description: 'Yet Another Text',\r\n        defaultMessage: 'Yet Another Text with {title}!'\r\n    }        \r\n};\r\n\r\nconsole.log(defineMessages(messages));\r\n```\r\n\r\nthen `babel-plugin-react-intl` throws this:\r\n\r\n```\r\nmessagesObj.get(...).map is not a function\r\n    at PluginPass.CallExpression (<ABRIDGED>\\node_modules\\babel-plugin-react-intl\\lib\\index.js:208:51)\r\n```\r\n\r\n**Direct copy/paste from `package.json`**\r\n\r\n```\r\n{\r\n  \"devDependencies\": {\r\n    \"babel-core\": \"^6.7.6\",\r\n    \"babel-plugin-react-intl\": \"^2.1.2\",\r\n    \"babel-preset-react\": \"^6.5.0\",   \r\n    \"react-intl\": \"^2.1.2\"\r\n}\r\n```\r\n\r\nI am a bit puzzled."},"comment":{"url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl/issues/comments/216388347","html_url":"https://github.com/yahoo/babel-plugin-react-intl/issues/49#issuecomment-216388347","issue_url":"https://api.github.com/repos/yahoo/babel-plugin-react-intl/issues/49","id":216388347,"user":{"login":"ericf","id":29096,"avatar_url":"https://avatars.githubusercontent.com/u/29096?v=3","gravatar_id":"","url":"https://api.github.com/users/ericf","html_url":"https://github.com/ericf","followers_url":"https://api.github.com/users/ericf/followers","following_url":"https://api.github.com/users/ericf/following{/other_user}","gists_url":"https://api.github.com/users/ericf/gists{/gist_id}","starred_url":"https://api.github.com/users/ericf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericf/subscriptions","organizations_url":"https://api.github.com/users/ericf/orgs","repos_url":"https://api.github.com/users/ericf/repos","events_url":"https://api.github.com/users/ericf/events{/privacy}","received_events_url":"https://api.github.com/users/ericf/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T22:50:52Z","updated_at":"2016-05-02T22:50:52Z","body":"https://github.com/yahoo/react-intl/tree/master/examples/nested"}}