{"comment":{"url":"https://api.github.com/repos/8alery/ws/comments/19022151","html_url":"https://github.com/8alery/ws/commit/8345d4c0d5234d0d9f541a96088ad92a7b073409#commitcomment-19022151","id":19022151,"user":{"login":"lpinca","id":1443911,"avatar_url":"https://avatars.githubusercontent.com/u/1443911?v=3","gravatar_id":"","url":"https://api.github.com/users/lpinca","html_url":"https://github.com/lpinca","followers_url":"https://api.github.com/users/lpinca/followers","following_url":"https://api.github.com/users/lpinca/following{/other_user}","gists_url":"https://api.github.com/users/lpinca/gists{/gist_id}","starred_url":"https://api.github.com/users/lpinca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpinca/subscriptions","organizations_url":"https://api.github.com/users/lpinca/orgs","repos_url":"https://api.github.com/users/lpinca/repos","events_url":"https://api.github.com/users/lpinca/events{/privacy}","received_events_url":"https://api.github.com/users/lpinca/received_events","type":"User","site_admin":false},"position":7,"line":690,"path":"lib/WebSocket.js","commit_id":"8345d4c0d5234d0d9f541a96088ad92a7b073409","created_at":"2016-09-14T16:35:43Z","updated_at":"2016-09-14T16:35:43Z","body":"I think the `length` check can be omitted, `path` is either `null` or a string of length >= `1`.\r\nI would use the following code:\r\n```js\r\nrequestOptions.path = serverUrl.path\r\n  ? serverUrl.path.charAt(0) !== '/'\r\n    ? `/${serverUrl.path}`\r\n    : serverUrl.path\r\n  : '/';\r\n```"}}
{"actor":{"display_login":"lpinca"}}