File tree 1 file changed +26
-21
lines changed
frontend/express/public/javascripts/countly
1 file changed +26
-21
lines changed Original file line number Diff line number Diff line change 89
89
} ) )
90
90
. then (
91
91
function ( ) {
92
- return $ . when ( $ . ajax ( {
93
- type : "GET" ,
94
- url : countlyCommon . API_PARTS . data . r ,
95
- data : {
96
- "app_id" : countlyCommon . ACTIVE_APP_ID ,
97
- "method" : "events" ,
98
- "event" : _activeEvent ,
99
- "segmentation" : currentActiveSegmentation ,
100
- "period" : _period ,
101
- "preventRequestAbort" : true
102
- } ,
103
- dataType : "json" ,
104
- success : function ( json ) {
105
- if ( currentActiveEvent === _activeEvent && currentActiveSegmentation === _activeSegmentation ) {
106
- _activeLoadedEvent = _activeEvent ;
107
- _activeLoadedSegmentation = _activeSegmentation ;
108
- _activeEventDb = json ;
109
- setMeta ( ) ;
92
+ if ( _activeEvent ) {
93
+ return $ . when ( $ . ajax ( {
94
+ type : "GET" ,
95
+ url : countlyCommon . API_PARTS . data . r ,
96
+ data : {
97
+ "app_id" : countlyCommon . ACTIVE_APP_ID ,
98
+ "method" : "events" ,
99
+ "event" : _activeEvent ,
100
+ "segmentation" : currentActiveSegmentation ,
101
+ "period" : _period ,
102
+ "preventRequestAbort" : true
103
+ } ,
104
+ dataType : "json" ,
105
+ success : function ( json ) {
106
+ if ( currentActiveEvent === _activeEvent && currentActiveSegmentation === _activeSegmentation ) {
107
+ _activeLoadedEvent = _activeEvent ;
108
+ _activeLoadedSegmentation = _activeSegmentation ;
109
+ _activeEventDb = json ;
110
+ setMeta ( ) ;
111
+ }
110
112
}
111
- }
112
- } ) ) . then ( function ( ) {
113
+ } ) ) . then ( function ( ) {
114
+ return true ;
115
+ } ) ;
116
+ }
117
+ else {
113
118
return true ;
114
- } ) ;
119
+ }
115
120
}
116
121
) ;
117
122
}
You can’t perform that action at this time.
0 commit comments