<div class="workflow-switch" data-ng-class="{ 'has-switch': availableStates }">
    <div class="workflow-switch-transcluded" data-ng-transclude=""></div>
    <div class="workflow-switch-container" data-ng-if="availableStates">
        <a class="button m-menu-action" href="" data-ng-click="switchState(newState)" data-ng-repeat="newState in availableStates">{{ "TR__SWITCH_STATE_TO" | translate }} {{ newState }}</a>
    </div>
</div>

<div class="workflow-switch" data-ng-class="{ 'has-switch': availableStates }">
    <div class="workflow-switch-transcluded" data-ng-transclude=""></div>
    <div class="workflow-switch-container" data-ng-if="availableStates.length">
        <a class="button m-menu-action" href="" data-ng-click="switchState(newState)" data-ng-repeat="newState in availableStates">{{ "TR__SWITCH_STATE_TO" | translate }} {{ newState }}</a>
    </div>
</div>

Use .length to get a value that is false when the backing array is empty.
Use .length to get a value that is false when the backing array is empty.
