From cc4688fd5d91252c8bed3ba866571a0ab408f181 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 2 Dec 2016 11:48:50 +0200 Subject: [PATCH] Don't show error screen for runtimes after render finished --- lib/components/Redoc/redoc.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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;