dwyl / dwyl/learn-postgresql

TypeError: Cannot read property 'id' of undefined result.rows[0].id ...

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
bug chore
Dominant language
JavaScript
Stars
346
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Obviously node.js _dies_ irrecoverably at the first sign of a `TypeError`:
![image](https://user-images.githubusercontent.com/194400/56323651-78a1bc00-6164-11e9-9d42-eb2b8a6044f1.png)

So apparently we need to wrap the result of returned by the db.query in an `if` check. 🙄

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.