While clicking on Select2 control, it tries to destroy the control and thus it doesn't get this object sometimes and throws error.

It should attempt to destroy the select2 object only if this object is not undefined.
This commit is contained in:
Surinder Kumar
2016-10-14 12:20:29 -07:00
committed by Dave Page
parent 0df968f679
commit 7f507f294e

View File

@@ -1894,7 +1894,7 @@
].join("\n")),
render: function() {
if(this.$sel && this.$sel.select2) {
if(this && this.$sel && this.$sel.select2) {
this.$sel.select2('destroy');
}