Skip to content

Commit 02d6e88

Browse files
author
Cyril Nicodème
committed
Update select2.js
Fix an exception when called "destroy" on a still opened dropdown.
1 parent 2a0c844 commit 02d6e88

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
@@ -1194,7 +1194,7 @@ the specific language governing permissions and limitations under the Apache Lic
11941194

11951195
// abstract
11961196
opened: function () {
1197-
return this.container.hasClass("select2-dropdown-open");
1197+
return (this.container) ? this.container.hasClass("select2-dropdown-open") : false;
11981198
},
11991199

12001200
// abstract

0 commit comments

Comments
 (0)