diff --git a/src/js/select2/data/ajax.js b/src/js/select2/data/ajax.js index 92b9e1dd..3309298f 100644 --- a/src/js/select2/data/ajax.js +++ b/src/js/select2/data/ajax.js @@ -80,6 +80,12 @@ define([ callback(results); }, function () { + // Attempt to detect if a request was aborted + // Only works if the transport exposes a status property + if ($request.status && $request.status === '0') { + return; + } + self.trigger('results:message', { message: 'errorLoading' });