Skip to content

Commit

Permalink
fix(id): Test for id != null & undefined at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc Merceron committed Sep 19, 2017
1 parent be18443 commit 79db13f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/referenceFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const retrieveUniquesIds = (parent, relation, optional = false) =>
const { [relation]: relationId } = object
if (!relationId && !optional) {
warning(`the relation ${relation} could not be found in object ${object.id}`, true)
} else if (acc.indexOf(relationId) === -1 && typeof relationId !== 'undefined') {
} else if (acc.indexOf(relationId) === -1 && relationId != null) {
// Keep the list unique
acc.push(relationId)
}
Expand Down

0 comments on commit 79db13f

Please sign in to comment.