Просмотр исходного кода

Merge pull request #1923 from riatiger/master

fix for Uncaught TypeError: Object #<Object> has no method 'abort'
Igor Vaynberg 11 лет назад
Родитель
Сommit
c0f37eafcb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -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)) {