From a3441beb9e96ea564ef24a9c2e8439b46b09a527 Mon Sep 17 00:00:00 2001 From: Kevin Abel <kabel2@unl.edu> Date: Tue, 16 Aug 2011 21:15:54 +0000 Subject: [PATCH] Added a safety check to the search cursor. --- www/searchFunc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/searchFunc.js b/www/searchFunc.js index 20c4c90..7b6efd4 100644 --- a/www/searchFunc.js +++ b/www/searchFunc.js @@ -128,7 +128,7 @@ UNL_Search.onSearchComplete = function(control, searcher) { } */ - if (searcher.cursor.estimatedResultCount) { + if (searcher.cursor && searcher.cursor.estimatedResultCount) { var $resultHead = $("<div />").addClass('result_head').text('About ' + searcher.cursor.estimatedResultCount + ' results'); $('.result_head', control.root).remove(); $('.gsc-results', control.root).before($resultHead); -- GitLab