This repository was archived by the owner on Jan 25, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments