1
0
mirror of synced 2025-03-10 22:56:12 +03:00

Merge pull request #64 from ghing/patch-1

Check for nonexistent data attribute in a way that works in jQuery 1.4.2
This commit is contained in:
Igor Vaynberg 2012-05-23 08:11:43 -07:00
commit 97125fb938

View File

@ -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();
}