From a71039df755e980f8ff1b32ea367250a0e74521a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 30 May 2012 07:03:11 -0400 Subject: [PATCH] Fix regression where redundant autocompletion requests were sent in case when new search value contains old one and previous search was not finished or its result was empty --- program/js/app.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 49d7b5f..9d6f7e8 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3804,7 +3804,7 @@ return; // ...new search value contains old one and previous search was not finished or its result was empty - if (old_value && old_value.length && q.indexOf(old_value) == 0 && (!ac || !ac.num) && this.env.contacts && !this.env.contacts.length) + if (old_value && old_value.length && q.indexOf(old_value) == 0 && (!ac || ac.num <= 0) && this.env.contacts && !this.env.contacts.length) return; var i, lock, source, xhr, reqid = new Date().getTime(), -- Gitblit v1.9.1