From 02d6e88747e8a86a8c3ed9af556adf42c2c9cfb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Nicod=C3=A8me?= Date: Tue, 20 May 2014 09:30:35 +0200 Subject: [PATCH] Update select2.js Fix an exception when called "destroy" on a still opened dropdown. --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 1769fbc0..7d979392 100644 --- a/select2.js +++ b/select2.js @@ -1194,7 +1194,7 @@ the specific language governing permissions and limitations under the Apache Lic // abstract opened: function () { - return this.container.hasClass("select2-dropdown-open"); + return (this.container) ? this.container.hasClass("select2-dropdown-open") : false; }, // abstract