From 63bcc1b548b3f650e322c78c0b4514b9e637fe1e Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 24 Feb 2016 12:53:15 -0500 Subject: [PATCH] Test for NaN-ness of hit count and index Signed-off-by: Mike Rylander --- Open-ILS/web/js/ui/default/staff/cat/catalog/app.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } ); -- 2.11.0