[FIX] #921 Fixed issue when discard a modal with draggable element

This commit is contained in:
Quentin THEURET
2018-05-15 20:42:14 +02:00
committed by tarteo
parent dea2528f86
commit 16a2192fc4
2 changed files with 6 additions and 4 deletions

View File

@@ -37,9 +37,11 @@ Dialog.include({
},
close: function() {
var draggable = this.$modal.draggable( "instance" );
if (draggable) {
this.$modal.draggable("destroy");
if (this.$modal) {
var draggable = this.$modal.draggable("instance");
if (draggable) {
this.$modal.draggable("destroy");
}
}
return this._super.apply(this, arguments);
},