File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export class LoadingCmp {
35
35
private d : any ;
36
36
private id : number ;
37
37
private showSpinner : boolean ;
38
+ private durationTimeout : number ;
38
39
39
40
constructor (
40
41
private _viewCtrl : ViewController ,
@@ -70,10 +71,13 @@ export class LoadingCmp {
70
71
}
71
72
72
73
// If there is a duration, dismiss after that amount of time
73
- this . d . duration ? setTimeout ( ( ) => this . dismiss ( 'backdrop' ) , this . d . duration ) : null ;
74
+ this . d . duration ? this . durationTimeout = setTimeout ( ( ) => this . dismiss ( 'backdrop' ) , this . d . duration ) : null ;
74
75
}
75
76
76
77
dismiss ( role : any ) : Promise < any > {
78
+ if ( this . durationTimeout ) {
79
+ clearTimeout ( this . durationTimeout ) ;
80
+ }
77
81
return this . _viewCtrl . dismiss ( null , role ) ;
78
82
}
79
83
}
You can’t perform that action at this time.
0 commit comments