Explorar o código

fix #1396 - fix destroy() when double initting

Igor Vaynberg %!s(int64=12) %!d(string=hai) anos
pai
achega
4969dcb42c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -652,7 +652,7 @@ the specific language governing permissions and limitations under the Apache Lic
             // destroy if called on an existing component
             if (opts.element.data("select2") !== undefined &&
                 opts.element.data("select2") !== null) {
-                this.destroy();
+                opts.element.data("select2").destroy();
             }
 
             this.container = this.createContainer();