From 4969dcb42ce23e62ddb35b8868f86d808ea76cbd Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Sun, 23 Jun 2013 15:21:16 -0700 Subject: [PATCH] fix #1396 - fix destroy() when double initting --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 56322556..49d7bcba 100644 --- a/select2.js +++ b/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();