Skip to content

Commit a4c51a7

Browse files
committed
fix relation bug
1 parent 2e73b26 commit a4c51a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/serializer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ var parseRelations = function (data, relations, options) {
8888
};
8989

9090
var makeRelation = function (type, id, options) {
91+
if (_.isEmpty(id)) {
92+
return null;
93+
}
9194
type = caserize(type, options.keyForRelation);
9295
var data = {
9396
type: type,

0 commit comments

Comments
 (0)