File tree 1 file changed +8
-9
lines changed 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,12 @@ define([
51
51
var windowId = this . windowId ,
52
52
content = '<div class="popup-window" id="' + windowId + '"></div>' ,
53
53
self = this ;
54
-
55
- if ( this . modalLoaded === true &&
56
- options &&
57
- self . targetElementId &&
58
- self . targetElementId === options . targetElementId
59
- ) {
60
- if ( typeof options . closed !== 'undefined' ) {
54
+
55
+ if ( this . modalLoaded === true
56
+ || ( self . targetElementId
57
+ && self . targetElementId === options . targetElementId ) ) {
58
+
59
+ if ( options && typeof options . closed !== 'undefined' ) {
61
60
this . modal . modal ( 'option' , 'closed' , options . closed ) ;
62
61
}
63
62
this . modal . modal ( 'openModal' ) ;
@@ -89,9 +88,9 @@ define([
89
88
} ) . done ( function ( data ) {
90
89
self . modal . html ( data ) . trigger ( 'contentUpdated' ) ;
91
90
self . modalLoaded = true ;
92
- self . targetElementId = options . targetElementId ;
91
+ options ? self . targetElementId = options . targetElementId : '' ;
93
92
} ) ;
94
- } ,
93
+ } ,
95
94
96
95
/**
97
96
* Close dialog.
You can’t perform that action at this time.
0 commit comments