|
@@ -5627,6 +5627,14 @@ S2.define('jquery.select2',[
|
|
return this;
|
|
return this;
|
|
} else if (typeof options === 'string') {
|
|
} else if (typeof options === 'string') {
|
|
var instance = this.data('select2');
|
|
var instance = this.data('select2');
|
|
|
|
+
|
|
|
|
+ if (instance == null && window.console && console.error) {
|
|
|
|
+ console.error(
|
|
|
|
+ 'The select2(\'' + options + '\') method was called on an ' +
|
|
|
|
+ 'element that is not using Select2.'
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
var args = Array.prototype.slice.call(arguments, 1);
|
|
var args = Array.prototype.slice.call(arguments, 1);
|
|
|
|
|
|
var ret = instance[options](args);
|
|
var ret = instance[options](args);
|