mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +03:00
fix: view errors were not reported
This commit is contained in:
parent
a9cad1994b
commit
6aa3a7d863
|
@ -101,9 +101,9 @@ export class Redoc extends BaseComponent implements OnInit {
|
||||||
if (!spec) {
|
if (!spec) {
|
||||||
this.appState.startLoading();
|
this.appState.startLoading();
|
||||||
} else {
|
} else {
|
||||||
|
this.specLoaded = true;
|
||||||
this.changeDetector.markForCheck();
|
this.changeDetector.markForCheck();
|
||||||
this.changeDetector.detectChanges();
|
this.changeDetector.detectChanges();
|
||||||
this.specLoaded = true;
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.hash.start();
|
this.hash.start();
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { AppStateService } from '../services/app-state.service';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CustomErrorHandler extends ErrorHandler {
|
export class CustomErrorHandler extends ErrorHandler {
|
||||||
constructor(private appState: AppStateService) {
|
constructor(private appState: AppStateService) {
|
||||||
super(true);
|
super();
|
||||||
}
|
}
|
||||||
handleError(error) {
|
handleError(error) {
|
||||||
this.appState.error.next(error && error.rejection || error);
|
this.appState.error.next(error && error.rejection || error);
|
||||||
|
|
|
@ -44,8 +44,8 @@ export class SpecManager {
|
||||||
this._schema = snapshot(schema);
|
this._schema = snapshot(schema);
|
||||||
try {
|
try {
|
||||||
this.init();
|
this.init();
|
||||||
resolve(this._schema);
|
|
||||||
this.spec.next(this._schema);
|
this.spec.next(this._schema);
|
||||||
|
resolve(this._schema);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user