From 2a04c3fc60e4f9cd8b59cbe6bcfbd56d0e29c98f Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 22 Apr 2011 04:57:30 +0200 Subject: Fixed other functions broken * not all functions are able to accept the null as return value (directly or indirectly) of filterByRegexp * finally make all logic not to affect components which shouldn't be bothered with the test. --- data/lib/queries.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'data/lib/queries.js') diff --git a/data/lib/queries.js b/data/lib/queries.js index 0c00792..7f935c8 100644 --- a/data/lib/queries.js +++ b/data/lib/queries.js @@ -78,6 +78,9 @@ function queryForSelection() { */ function queryUpstreamCallback(text, queryUpBug) { var searchData = filterByRegexp(queryUpBug, getComponent()); + if (!searchData) { + return ; // not sure why it should happen, but certainly better + } var urlBase = searchData.url; text = searchData.searchBy+":"+searchData.fillIn+" "+text.trim(); if (searchData.fillIn == "$$$") { -- cgit