|
@@ -12161,6 +12161,16 @@ define('select2/data/ajax',[
|
|
|
$request.success(function (data) {
|
|
|
var results = self.processResults(data, params);
|
|
|
|
|
|
+ if (console && console.error) {
|
|
|
+ // Check to make sure that the response included a `results` key.
|
|
|
+ if (!results || !results.results || !$.isArray(results.results)) {
|
|
|
+ console.error(
|
|
|
+ 'Select2: The AJAX results did not return an array in the ' +
|
|
|
+ '`results` key of the response.'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
callback(results);
|
|
|
});
|
|
|
|