{"action":"closed","issue":{"url":"https://api.github.com/repos/voxpelli/node-connect-pg-simple/issues/19","labels_url":"https://api.github.com/repos/voxpelli/node-connect-pg-simple/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/voxpelli/node-connect-pg-simple/issues/19/comments","events_url":"https://api.github.com/repos/voxpelli/node-connect-pg-simple/issues/19/events","html_url":"https://github.com/voxpelli/node-connect-pg-simple/issues/19","id":68368068,"number":19,"title":"Invalid DB logic","user":{"login":"vitaly-t","id":5108906,"avatar_url":"https://avatars.githubusercontent.com/u/5108906?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-t","html_url":"https://github.com/vitaly-t","followers_url":"https://api.github.com/users/vitaly-t/followers","following_url":"https://api.github.com/users/vitaly-t/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-t/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-t/subscriptions","organizations_url":"https://api.github.com/users/vitaly-t/orgs","repos_url":"https://api.github.com/users/vitaly-t/repos","events_url":"https://api.github.com/users/vitaly-t/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-t/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-14T13:11:34Z","updated_at":"2015-04-15T12:25:52Z","closed_at":"2015-04-15T12:25:52Z","body":"Line 127:\r\n```javascript\r\nif (fn) { fn(err, result && result.rows[0] ? result.rows[0] : false); }\r\n```\r\n`result` in that context is non-null even when 0 rows are returned, so your code will throw an exception trying to access `result.rows[0]` in that case.\r\n"}}