{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/botbuilder-js/issues/380","repository_url":"https://api.github.com/repos/Microsoft/botbuilder-js","labels_url":"https://api.github.com/repos/Microsoft/botbuilder-js/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/botbuilder-js/issues/380/comments","events_url":"https://api.github.com/repos/Microsoft/botbuilder-js/issues/380/events","html_url":"https://github.com/Microsoft/botbuilder-js/issues/380","id":354743382,"node_id":"MDU6SXNzdWUzNTQ3NDMzODI=","number":380,"title":"What is the purpose of this strange use of array.filter?","user":{"login":"benbrown","id":729873,"node_id":"MDQ6VXNlcjcyOTg3Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/729873?v=4","gravatar_id":"","url":"https://api.github.com/users/benbrown","html_url":"https://github.com/benbrown","followers_url":"https://api.github.com/users/benbrown/followers","following_url":"https://api.github.com/users/benbrown/following{/other_user}","gists_url":"https://api.github.com/users/benbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/benbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbrown/subscriptions","organizations_url":"https://api.github.com/users/benbrown/orgs","repos_url":"https://api.github.com/users/benbrown/repos","events_url":"https://api.github.com/users/benbrown/events{/privacy}","received_events_url":"https://api.github.com/users/benbrown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Stevenic","id":698939,"node_id":"MDQ6VXNlcjY5ODkzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/698939?v=4","gravatar_id":"","url":"https://api.github.com/users/Stevenic","html_url":"https://github.com/Stevenic","followers_url":"https://api.github.com/users/Stevenic/followers","following_url":"https://api.github.com/users/Stevenic/following{/other_user}","gists_url":"https://api.github.com/users/Stevenic/gists{/gist_id}","starred_url":"https://api.github.com/users/Stevenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stevenic/subscriptions","organizations_url":"https://api.github.com/users/Stevenic/orgs","repos_url":"https://api.github.com/users/Stevenic/repos","events_url":"https://api.github.com/users/Stevenic/events{/privacy}","received_events_url":"https://api.github.com/users/Stevenic/received_events","type":"User","site_admin":false},"assignees":[{"login":"Stevenic","id":698939,"node_id":"MDQ6VXNlcjY5ODkzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/698939?v=4","gravatar_id":"","url":"https://api.github.com/users/Stevenic","html_url":"https://github.com/Stevenic","followers_url":"https://api.github.com/users/Stevenic/followers","following_url":"https://api.github.com/users/Stevenic/following{/other_user}","gists_url":"https://api.github.com/users/Stevenic/gists{/gist_id}","starred_url":"https://api.github.com/users/Stevenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stevenic/subscriptions","organizations_url":"https://api.github.com/users/Stevenic/orgs","repos_url":"https://api.github.com/users/Stevenic/repos","events_url":"https://api.github.com/users/Stevenic/events{/privacy}","received_events_url":"https://api.github.com/users/Stevenic/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-08-28T13:56:35Z","updated_at":"2018-08-28T16:18:35Z","closed_at":null,"author_association":"NONE","body":"There are a handful of places in the code there is a construction like this, where filter is being called but the filter function simply returns the value unchanged:\r\n\r\n```\r\n const list: Choice[] = (choices || []).map(\r\n        (choice: Choice) => typeof choice === 'string' ? { value: choice } : choice\r\n    ).filter(\r\n        (choice: Choice) => choice // TODO: does this do anything?\r\n    );\r\n```\r\n\r\nWhat is the point of calling filter like this?"},"comment":{"url":"https://api.github.com/repos/Microsoft/botbuilder-js/issues/comments/416648918","html_url":"https://github.com/Microsoft/botbuilder-js/issues/380#issuecomment-416648918","issue_url":"https://api.github.com/repos/Microsoft/botbuilder-js/issues/380","id":416648918,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjY0ODkxOA==","user":{"login":"stevengum","id":14935595,"node_id":"MDQ6VXNlcjE0OTM1NTk1","avatar_url":"https://avatars1.githubusercontent.com/u/14935595?v=4","gravatar_id":"","url":"https://api.github.com/users/stevengum","html_url":"https://github.com/stevengum","followers_url":"https://api.github.com/users/stevengum/followers","following_url":"https://api.github.com/users/stevengum/following{/other_user}","gists_url":"https://api.github.com/users/stevengum/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengum/subscriptions","organizations_url":"https://api.github.com/users/stevengum/orgs","repos_url":"https://api.github.com/users/stevengum/repos","events_url":"https://api.github.com/users/stevengum/events{/privacy}","received_events_url":"https://api.github.com/users/stevengum/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T16:18:35Z","updated_at":"2018-08-28T16:18:35Z","author_association":"MEMBER","body":"Whoops, accidentally closed this; sorry everyone!"}}
{"actor":{"display_login":"stevengum"}}