{"action":"closed","issue":{"url":"https://api.github.com/repos/babel/babel/issues/2991","labels_url":"https://api.github.com/repos/babel/babel/issues/2991/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/2991/comments","events_url":"https://api.github.com/repos/babel/babel/issues/2991/events","html_url":"https://github.com/babel/babel/issues/2991","id":116406934,"number":2991,"title":"Bug: Unexpected return value from visitor method function","user":{"login":"mehcode","id":753919,"avatar_url":"https://avatars.githubusercontent.com/u/753919?v=3","gravatar_id":"","url":"https://api.github.com/users/mehcode","html_url":"https://github.com/mehcode","followers_url":"https://api.github.com/users/mehcode/followers","following_url":"https://api.github.com/users/mehcode/following{/other_user}","gists_url":"https://api.github.com/users/mehcode/gists{/gist_id}","starred_url":"https://api.github.com/users/mehcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehcode/subscriptions","organizations_url":"https://api.github.com/users/mehcode/orgs","repos_url":"https://api.github.com/users/mehcode/repos","events_url":"https://api.github.com/users/mehcode/events{/privacy}","received_events_url":"https://api.github.com/users/mehcode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/babel/babel/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-11-11T19:42:13Z","updated_at":"2015-11-12T01:20:38Z","closed_at":"2015-11-12T01:20:38Z","body":"```bash\r\n$ node --version\r\nv5.0.0\r\n\r\n$ babel --version\r\n6.1.4 (babel-core 6.1.4)\r\n```\r\n\r\n---\r\n\r\n**Source**\r\n```\r\nif (process.env.NODE_ENV === \"development\") {\r\n  development();\r\n} else {\r\n  production();\r\n}\r\n```\r\n\r\n**`.babelrc`**\r\n```\r\n{\r\n  \"plugins\": [\r\n    \"transform-inline-environment-variables\"\r\n  ]\r\n}\r\n```\r\n\r\n**Error**\r\n```\r\nError: test.js: Unexpected return value from visitor method function MemberExpression(path) {\r\n        if (path.get(\"object\").matchesPattern(\"process.env\")) {\r\n          var key = path.toComputedKey();\r\n          if (t.isStringLiteral(key)) {\r\n            return t.valueToNode(process.env[key.value]);\r\n          }\r\n        }\r\n      }\r\n    at NodePath._call (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:73:20)\r\n    at NodePath.call (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:44:17)\r\n    at NodePath.visit (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:102:12)\r\n    at TraversalContext.visitQueue (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/context.js:151:16)\r\n    at TraversalContext.visitSingle (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/context.js:111:19)\r\n    at TraversalContext.visit (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/context.js:195:19)\r\n    at Function.traverse.node (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/index.js:141:17)\r\n    at NodePath.visit (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:106:22)\r\n    at TraversalContext.visitQueue (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/context.js:151:16)\r\n    at TraversalContext.visitSingle (/home/ryan/.nvm/versions/node/v5.0.0/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/context.js:111:19)\r\n```"}}