Skip to content

Commit 4969dcb

Browse files
committed
fix select2#1396 - fix destroy() when double initting
1 parent ef13673 commit 4969dcb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ the specific language governing permissions and limitations under the Apache Lic
652652
// destroy if called on an existing component
653653
if (opts.element.data("select2") !== undefined &&
654654
opts.element.data("select2") !== null) {
655-
this.destroy();
655+
opts.element.data("select2").destroy();
656656
}
657657

658658
this.container = this.createContainer();

0 commit comments

Comments
 (0)