diff --git a/lib/components/Redoc/redoc.ts b/lib/components/Redoc/redoc.ts index a2b23b6e..8efcd4d7 100644 --- a/lib/components/Redoc/redoc.ts +++ b/lib/components/Redoc/redoc.ts @@ -109,16 +109,12 @@ export class Redoc extends BaseComponent implements OnInit { this.appState.error.subscribe(_err => { if (!_err) return; - if (this.specLoading) { - this.specLoaded = true; - this.hideLoadingAnimation(); - } + this.appState.stopLoading(); + + if (this.loadingProgress === 100) return; this.error = _err; this.changeDetector.markForCheck(); - setTimeout(() => { - this.changeDetector.detectChanges() - }); - }) + }); if (this.specUrl) { this.options.specUrl = this.specUrl;