Showing
1 changed file
with
6 additions
and
3 deletions
... | ... | @@ -439,7 +439,7 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
439 | 439 | return entityId; |
440 | 440 | } |
441 | 441 | |
442 | - function getStateEntityId(filter, stateParams) { | |
442 | + function getStateEntityInfo(filter, stateParams) { | |
443 | 443 | var entityId = null; |
444 | 444 | if (stateParams) { |
445 | 445 | if (filter.stateEntityParamName && filter.stateEntityParamName.length) { |
... | ... | @@ -456,7 +456,9 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
456 | 456 | if (entityId) { |
457 | 457 | entityId = resolveAliasEntityId(entityId.entityType, entityId.id); |
458 | 458 | } |
459 | - return entityId; | |
459 | + return { | |
460 | + entityId: entityId | |
461 | + }; | |
460 | 462 | } |
461 | 463 | |
462 | 464 | function resolveAliasFilter(filter, stateParams, maxItems, failOnEmpty) { |
... | ... | @@ -468,7 +470,8 @@ function EntityService($http, $q, $filter, $translate, $log, userService, device |
468 | 470 | if (filter.stateEntityParamName && filter.stateEntityParamName.length) { |
469 | 471 | result.entityParamName = filter.stateEntityParamName; |
470 | 472 | } |
471 | - var stateEntityId = getStateEntityId(filter, stateParams); | |
473 | + var stateEntityInfo = getStateEntityInfo(filter, stateParams); | |
474 | + var stateEntityId = stateEntityInfo.entityId; | |
472 | 475 | switch (filter.type) { |
473 | 476 | case types.aliasFilterType.singleEntity.value: |
474 | 477 | var aliasEntityId = resolveAliasEntityId(filter.singleEntity.entityType, filter.singleEntity.id); | ... | ... |