summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-03 13:57:47 +0000
committeralecpl <alec@alec.pl>2011-08-03 13:57:47 +0000
commit5f5cf89c84c7c92f489f02bae41468ab2a63e4db (patch)
treefb960f5f56859178c5066e95b676d266d29130d2
parent2c77f553c85393d2006b42908647c31c352f6b81 (diff)
- Check current search value in ksearch_query_results() to prevent from wrong regexp replacement when it's empty
-rw-r--r--program/js/app.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index f002dcae3..1c35ad0d9 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3640,8 +3640,12 @@ function rcube_webmail()
this.ksearch_query_results = function(results, search, reqid)
{
+ // search stopped in meantime?
+ if (!this.ksearch_value)
+ return;
+
// ignore this outdated search response
- if (this.ksearch_input && this.ksearch_value && search != this.ksearch_value)
+ if (this.ksearch_input && search != this.ksearch_value)
return;
// display search results