ahoym / redesert

Work in Progress - Opinionated HOFs for auto-generating REST API consuming redux logic
MIT License
3 stars 1 forks source link

fix: add existence check inside get*ErrorsById #27

Closed ahoym closed 6 years ago

ahoym commented 6 years ago

Fixes: https://github.com/ahoym/redesert/issues/25

Context

If an app using redesert tries to use get*ErrorsById and the entity doesn't exist, it will throw an error. This is because of not being able to call a property of undefined or null.

Changes

Tasks

codeclimate[bot] commented 6 years ago

Code Climate has analyzed commit 73f67859 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 97.5% (0.0% change).

View more on Code Climate.

ahoym commented 6 years ago

Will not address the CC any further as doing it would make the test code harder to read in my opinon