File tree Expand file tree Collapse file tree
plugins/dashboards/frontend/public/javascripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33( function ( countlyDashboards ) {
44
5+ var isRequestCancelled = function ( e ) {
6+ var isCancelled = false ;
7+ if ( e && e . statusText === "abort" ) {
8+ isCancelled = true ;
9+ }
10+ return isCancelled ;
11+ } ;
512 countlyDashboards . factory = {
613 dashboards : {
714 getEmpty : function ( ) {
643650
644651 return dashbaord ;
645652 } ) . catch ( function ( e ) {
646- log ( e ) ;
647- CountlyHelpers . notify ( {
648- message : "Something went wrong while fetching the dashbaord!" ,
649- type : "error"
650- } ) ;
653+ if ( ! isRequestCancelled ( e ) ) {
654+ log ( e ) ;
655+ CountlyHelpers . notify ( {
656+ message : "Something went wrong while fetching the dashbaord!" ,
657+ type : "error"
658+ } ) ;
659+ }
660+ else {
661+ log ( "Request cancelled: " + e ) ;
662+ }
651663
652664 return false ;
653665 } ) ;
You can’t perform that action at this time.
0 commit comments