Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 4344eb7

Browse files
committed
fix
1 parent eae589b commit 4344eb7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/index.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ export class JSONAPISerializer {
344344
}
345345

346346
private serializeEntity(
347-
data: any,
347+
data: JSONApiResource,
348348
config: SerializerConfig,
349349
includedEntities: JSONApiResource[],
350350
serializedEntities: JSONApiResource[],
@@ -355,11 +355,6 @@ export class JSONAPISerializer {
355355
const entityId = get(data, "id");
356356
const entityType = get(data, "type") || config.type;
357357

358-
// detect optional whitelist processing
359-
// if compound is true and includeWhitelistKeys is not defined should compound everything
360-
const shouldProcessIncludedOrCompound =
361-
includeWhitelistKeys || (!includeWhitelistKeys && compound);
362-
363358
if (entityId) {
364359
if (this.isEntitySerialized(serializedEntities, entityId, entityType)) {
365360
return this.getSerializedEntity(
@@ -418,10 +413,6 @@ export class JSONAPISerializer {
418413
forIn(relationships, (value, dashCaseKey) => {
419414
const key = camelCase(dashCaseKey);
420415

421-
if (!shouldProcessIncludedOrCompound) {
422-
return;
423-
}
424-
425416
if (includeWhitelistKeys) {
426417
const isKeyWhitelisted = this.isKeyWhitelistedIncluded(
427418
key,

0 commit comments

Comments
 (0)