Fixed undefined opts
when using select2('data')
This issue only affected single selects and should have happened when calling `select2('data')` when passing in the new data object to select. This closes https://github.com/select2/select2/issues/3694
This commit is contained in:
parent
2b8cbde7eb
commit
a7e8f2bfad
@ -2745,7 +2745,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
if (data == undefined) data = null;
|
if (data == undefined) data = null;
|
||||||
return data;
|
return data;
|
||||||
} else {
|
} else {
|
||||||
if (opts.debug && console && console.warn) {
|
if (this.opts.debug && console && console.warn) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'Select2: The `select2("data")` method can no longer set selected values in 4.0.0, ' +
|
'Select2: The `select2("data")` method can no longer set selected values in 4.0.0, ' +
|
||||||
'consider using the `.val()` method instead.'
|
'consider using the `.val()` method instead.'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user