Skip to content

Commit

Permalink
fix(end of bar): fix an error that not completed progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
kKen94 committed Nov 19, 2019
1 parent dc31129 commit 0d3257a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/lib/src/lib/ngx-progress.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class NgxProgressService {
* Se ci sono però altre chiamate / navigazioni di mezzo non sparisce finché non vengono risolte anche quelle
*/
end(): void {
this.progressCount--;
if (this.progressCount > 0) {
this.progressCount--;
}
setTimeout(() => {
if (this.progressCount === 0) {
this.vendorBarService.complete();
Expand Down

0 comments on commit 0d3257a

Please sign in to comment.