Skip to content

Commit 8a36767

Browse files
committed
fix(loading): improvements condition dismiss()
1 parent 9324128 commit 8a36767

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/providers/loading-ionic.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,22 @@ export class LoadingIonicPlugin extends PluginBase implements PreRequestPlugin,
5252
}
5353

5454
dismiss() {
55-
if (this.allow) {
55+
if (this.loading) {
5656
this.loading.dismissAll();
5757
}
5858

5959
this.loading = null;
60+
this.restoreOptions();
6061
}
6162

6263
postRequest() {
63-
if (this.loading !== null && this.skippedCount === null) {
64+
if (this.skippedCount === null) {
6465
this.dismiss();
6566
}
66-
67-
this.restoreOptions();
6867
}
6968

7069
postRequestError() {
71-
if (this.loading !== null) {
72-
this.dismiss();
73-
}
74-
75-
this.restoreOptions();
70+
this.dismiss();
7671
}
7772

7873
disableLoading(skip?: boolean | number): this {

0 commit comments

Comments
 (0)