Rewrite existing specs

This commit is contained in:
Matt-Yorkley
2018-09-17 16:34:52 +01:00
parent 68f0c80016
commit b2551b4e0b
9 changed files with 52 additions and 40 deletions

View File

@@ -37,7 +37,7 @@ angular.module("admin.orders").controller "ordersCtrl", ($scope, $injector, Requ
})
$scope.$watch 'sortOptions', (sort) ->
if sort.predicate != ""
if sort && sort.predicate != ""
$scope.sorting = sort.predicate + ' desc' if sort.reverse
$scope.sorting = sort.predicate + ' asc' if !sort.reverse
$scope.fetchResults()