Showing
1 changed file
with
4 additions
and
9 deletions
... | ... | @@ -502,15 +502,10 @@ export class EntityService { |
502 | 502 | |
503 | 503 | public getAliasFilterTypesByEntityTypes(entityTypes: Array<EntityType | AliasEntityType>): Array<AliasFilterType> { |
504 | 504 | const authState = getCurrentAuthState(this.store); |
505 | - const allAliasFilterTypes: Array<AliasFilterType> = Object.keys(AliasFilterType) | |
506 | - .map((key) => AliasFilterType[key]) | |
507 | - .filter(aft => { | |
508 | - if (authState.edgesSupportEnabled) { | |
509 | - return true; | |
510 | - } else { | |
511 | - return edgeAliasFilterTypes.indexOf(aft) === -1; | |
512 | - } | |
513 | - }); | |
505 | + let allAliasFilterTypes: Array<AliasFilterType> = Object.values(AliasFilterType); | |
506 | + if (!authState.edgesSupportEnabled) { | |
507 | + allAliasFilterTypes = allAliasFilterTypes.filter(aliasFilterType => !edgeAliasFilterTypes.includes(aliasFilterType)); | |
508 | + } | |
514 | 509 | if (!entityTypes || !entityTypes.length) { |
515 | 510 | return allAliasFilterTypes; |
516 | 511 | } | ... | ... |