Check for nonexistent data attribute in a way that works in jQuery 1.4.2
This commit is contained in:
parent
058ecae750
commit
6dcb276485
@ -352,7 +352,8 @@
|
||||
this.id=opts.id;
|
||||
|
||||
// destroy if called on an existing component
|
||||
if (opts.element.data("select2") !== undefined) {
|
||||
if (opts.element.data("select2") !== undefined &&
|
||||
opts.element.data("select2") !== null) {
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user