Merge pull request #713 from powellzer/master
Check if select2 input exists before destroy
This commit is contained in:
commit
0cf3b10e8e
8
src/inputs/select2/select2.js
vendored
8
src/inputs/select2/select2.js
vendored
@ -294,9 +294,11 @@ $(function(){
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if(this.$input.data('select2')) {
|
||||
this.$input.select2('destroy');
|
||||
}
|
||||
if(this.$input) {
|
||||
if(this.$input.data('select2')) {
|
||||
this.$input.select2('destroy');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user