Skip to content

Commit

Permalink
Fixed #207: Catch promises that are not handled elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
spoenemann committed Oct 21, 2021
1 parent e13c794 commit daaf774
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base/actions/action-dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ActionDispatcher implements IActionDispatcher {
if (!this.initialized) {
this.initialized = this.actionHandlerRegistryProvider().then(registry => {
this.actionHandlerRegistry = registry;
this.handleAction(new SetModelAction(EMPTY_ROOT));
this.handleAction(new SetModelAction(EMPTY_ROOT)).catch(() => { /* Logged in handleAction method */ });
});
}
return this.initialized;
Expand Down Expand Up @@ -100,7 +100,7 @@ export class ActionDispatcher implements IActionDispatcher {
}
const deferred = new Deferred<Res>();
this.requests.set(action.requestId, deferred);
this.dispatch(action);
this.dispatch(action).catch(() => { /* Logged in handleAction method */ });
return deferred.promise;
}

Expand Down

0 comments on commit daaf774

Please sign in to comment.