fix: view errors were not reported

This commit is contained in:
Roman Hotsiy 2017-03-29 13:29:54 +03:00
parent a9cad1994b
commit 6aa3a7d863
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 3 additions and 3 deletions

View File

@ -101,9 +101,9 @@ export class Redoc extends BaseComponent implements OnInit {
if (!spec) {
this.appState.startLoading();
} else {
this.specLoaded = true;
this.changeDetector.markForCheck();
this.changeDetector.detectChanges();
this.specLoaded = true;
setTimeout(() => {
this.hash.start();
});

View File

@ -4,7 +4,7 @@ import { AppStateService } from '../services/app-state.service';
@Injectable()
export class CustomErrorHandler extends ErrorHandler {
constructor(private appState: AppStateService) {
super(true);
super();
}
handleError(error) {
this.appState.error.next(error && error.rejection || error);

View File

@ -44,8 +44,8 @@ export class SpecManager {
this._schema = snapshot(schema);
try {
this.init();
resolve(this._schema);
this.spec.next(this._schema);
resolve(this._schema);
} catch(err) {
reject(err);
}