We need to make sure that we receive the correct shape of data (array) rather
than that we simply got anything when fetching sessions. In the case of an
expired session token, we'll receive an ILS Event object informing us of the
expiration where we'd normally see a list of sessions.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dawn Dale <ddale@georgialibraries.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
});
}
+ $scope.sessions = [];
$scope.refreshSessions = function () {
return $http.get(formURL({action:'status',status_type:'sessions'})).then(function(res) {
- if (res.data) {
+ if (angular.isArray(res.data)) {
$scope.sessions = res.data;
return $q.when();
}