From 412b19d5aaa2f969946949358c401b6aad796852 Mon Sep 17 00:00:00 2001 From: Kasun Gajasinghe Date: Fri, 30 Sep 2011 19:21:02 +0000 Subject: [PATCH] fix no. 2 - Fix for missing "No results found for..." bug --- xsl/webhelp/template/content/search/nwSearchFnt.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xsl/webhelp/template/content/search/nwSearchFnt.js b/xsl/webhelp/template/content/search/nwSearchFnt.js index addd48045..ba802d224 100644 --- a/xsl/webhelp/template/content/search/nwSearchFnt.js +++ b/xsl/webhelp/template/content/search/nwSearchFnt.js @@ -704,7 +704,11 @@ function SortResults(mots) { finalObj = new Array(); for (t in fileAndWordList) { finalObj.push(new newObj(t,fileAndWordList[t])); - } + } + + if ( finalObj.length == 0 ) { // None of the queried words are not in the index (stemmed or not) + return null; + } finalObj = removeDerivates(finalObj); for (t in finalObj) { tab = finalObj[t].wordList.split(','); -- 2.40.0