Skip to content

Commit

Permalink
fix(json-api-nestjs-sdk): Allow empty atrributes for sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
klerick committed Apr 21, 2024
1 parent 5d2f9d9 commit c4b2675
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class JsonApiSdkService {
data: {
id: entity[this.jsonApiSdkConfig.idKey].toString(),
type: getTypeForReq(entity.constructor.name),
attributes,
...(Object.keys(attributes).length > 0 ? { attributes } : {}),
...(Object.keys(relationships).length > 0 ? { relationships } : {}),
},
};
Expand Down

0 comments on commit c4b2675

Please sign in to comment.