Skip to content

Commit 9678cad

Browse files
alltouchdigitalsadhu
authored andcommitted
fix(serializer): incorrect id check
1 parent c1f8581 commit 9678cad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/serializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function parseRelations (data, relations, options) {
283283
* @return {Object|null}
284284
*/
285285
function makeRelation (type, id, options) {
286-
if (_.isEmpty(id)) {
286+
if (!_.includes(['string', 'number'], typeof id) || !id) {
287287
return null
288288
}
289289

0 commit comments

Comments
 (0)