{"action":"created","issue":{"url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/381","repository_url":"https://api.github.com/repos/SBoudrias/Inquirer.js","labels_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/381/comments","events_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/381/events","html_url":"https://github.com/SBoudrias/Inquirer.js/issues/381","id":158531989,"number":381,"title":"Default not activated when !when","user":{"login":"TimothyGu","id":1538624,"avatar_url":"https://avatars.githubusercontent.com/u/1538624?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyGu","html_url":"https://github.com/TimothyGu","followers_url":"https://api.github.com/users/TimothyGu/followers","following_url":"https://api.github.com/users/TimothyGu/following{/other_user}","gists_url":"https://api.github.com/users/TimothyGu/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyGu/subscriptions","organizations_url":"https://api.github.com/users/TimothyGu/orgs","repos_url":"https://api.github.com/users/TimothyGu/repos","events_url":"https://api.github.com/users/TimothyGu/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyGu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-05T01:08:12Z","updated_at":"2016-06-05T03:33:46Z","closed_at":"2016-06-05T02:50:06Z","body":"```js\r\nrequire('inquirer').prompt([\r\n  {\r\n    type: 'input',\r\n    name: '_',\r\n    message: 'msg',\r\n    default: 'sfd',\r\n    when: false\r\n  }\r\n]).then(a => console.log(a._));\r\n```\r\n\r\n```\r\n$ node -v\r\nv6.2.1\r\n$ node a\r\nundefined\r\n```\r\n\r\nIs this a bug? If not, the behavior is certainly surprising as I would expect the output to be `sfd`."},"comment":{"url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/comments/223791116","html_url":"https://github.com/SBoudrias/Inquirer.js/issues/381#issuecomment-223791116","issue_url":"https://api.github.com/repos/SBoudrias/Inquirer.js/issues/381","id":223791116,"user":{"login":"TimothyGu","id":1538624,"avatar_url":"https://avatars.githubusercontent.com/u/1538624?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyGu","html_url":"https://github.com/TimothyGu","followers_url":"https://api.github.com/users/TimothyGu/followers","following_url":"https://api.github.com/users/TimothyGu/following{/other_user}","gists_url":"https://api.github.com/users/TimothyGu/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyGu/subscriptions","organizations_url":"https://api.github.com/users/TimothyGu/orgs","repos_url":"https://api.github.com/users/TimothyGu/repos","events_url":"https://api.github.com/users/TimothyGu/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyGu/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T03:33:46Z","updated_at":"2016-06-05T03:33:46Z","body":"But the point is that there's a default for this specific member, and the documentation says that it is the \"default value(s) to use if nothing is entered.\" If `when` is false, indeed nothing is entered, and I was surprised to find that the default is not used."}}
{"actor":{"display_login":"TimothyGu"}}