1
0
mirror of synced 2024-11-29 16:16:02 +03:00

fix for Uncaught TypeError

Prevents "Uncaught TypeError: Object #<Object> has no method 'abort'"
error for case when non-jQuery promise is used as a handler (AngularJS
$promise for example).
This commit is contained in:
riatiger 2013-11-21 19:58:01 +02:00
parent 0967c67776
commit 50f813c003

View File

@ -431,7 +431,7 @@ the specific language governing permissions and limitations under the Apache Lic
data = data ? data.call(self, query.term, query.page, query.context) : null;
url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
if (handler) { handler.abort(); }
if (handler && typeof handler.abort === "function") { handler.abort(); }
if (options.params) {
if ($.isFunction(options.params)) {