Commit 60acd6f56aa5b45f01c99768859d608c793f2ba0

Authored by Volodymyr Babak
1 parent cd78514b

Code review changes

@@ -502,15 +502,10 @@ export class EntityService { @@ -502,15 +502,10 @@ export class EntityService {
502 502
503 public getAliasFilterTypesByEntityTypes(entityTypes: Array<EntityType | AliasEntityType>): Array<AliasFilterType> { 503 public getAliasFilterTypesByEntityTypes(entityTypes: Array<EntityType | AliasEntityType>): Array<AliasFilterType> {
504 const authState = getCurrentAuthState(this.store); 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 if (!entityTypes || !entityTypes.length) { 509 if (!entityTypes || !entityTypes.length) {
515 return allAliasFilterTypes; 510 return allAliasFilterTypes;
516 } 511 }