function getFieldFromDoc(doc, parsedField) doc is undefined => Server crashed
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue
Server is crashing randomly with this exeption:
projectpath\node_modules\pouchdb-selector-core\lib\index.js:17
value = value[key];
_______________^
TypeError: Cannot read properties of undefined (reading 'name')
at getFieldFromDoc (projectpath\node_modules\pouchdb-selector-core\lib\index.js:17:18)
### Info
- Environment: Node.js
- Frontend build with Angular Material
- Platform: Chrome
- Adapter: LevelDB (not shure)
- Server: Web server with Node.js
### Reproduce
Not reproducible, but I fixed it in my project by checking the doc value and returning immediately if doc is undefined

Contributor guide
Assessment
This issue has not been assessed yet.