Skip to content

Commit c4b2675

Browse files
committed
fix(json-api-nestjs-sdk): Allow empty atrributes for sdk
1 parent 5d2f9d9 commit c4b2675

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class JsonApiSdkService {
171171
data: {
172172
id: entity[this.jsonApiSdkConfig.idKey].toString(),
173173
type: getTypeForReq(entity.constructor.name),
174-
attributes,
174+
...(Object.keys(attributes).length > 0 ? { attributes } : {}),
175175
...(Object.keys(relationships).length > 0 ? { relationships } : {}),
176176
},
177177
};

0 commit comments

Comments
 (0)