From: Mike Rylander Date: Wed, 24 Feb 2016 17:53:15 +0000 (-0500) Subject: Test for NaN-ness of hit count and index X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=63bcc1b548b3f650e322c78c0b4514b9e637fe1e;p=working%2FEvergreen.git Test for NaN-ness of hit count and index Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index 3a6b708a95..e2540b6767 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -248,20 +248,22 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e $scope.opac_iframe = null; $scope.parts_iframe = null; - $scope.search_result_index = 0; - $scope.search_result_hit_count = 0; + $scope.search_result_index = 1; + $scope.search_result_hit_count = 1; $scope.$watch( 'opac_iframe.dom.contentWindow.search_result_index', function (n,o) { - $scope.search_result_index = n + 1; + if (!isNaN(parseInt(n))) + $scope.search_result_index = n + 1; } ); $scope.$watch( 'opac_iframe.dom.contentWindow.search_result_hit_count', function (n,o) { - $scope.search_result_hit_count = n; + if (!isNaN(parseInt(n))) + $scope.search_result_hit_count = n; } );