Skip to content

Commit

Permalink
fix(core): CHECKOUT-3053 Fix issue related to error action not able t…
Browse files Browse the repository at this point in the history
…o dispatch
  • Loading branch information
davidchin committed May 13, 2018
1 parent 7b8e2ad commit 443c300
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/data-store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { isEqual, merge } from 'lodash';
import { from } from 'rxjs/observable/from';
import { of } from 'rxjs/observable/of';
import { _throw } from 'rxjs/observable/throw';
import { catchError, concatMap, distinctUntilChanged, filter, first, map, mergeMap, scan, tap } from 'rxjs/operators';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Observable, Subscribable, SubscribableOrPromise } from 'rxjs/Observable';
Expand Down Expand Up @@ -131,9 +132,7 @@ export default class DataStore<TState, TAction extends Action = Action, TTransfo
action: TDispatchAction
): Promise<TTransformedState> {
return this._dispatchObservableAction(
action.error ?
Observable.throw(action) :
of(action)
action.error ? _throw(action) : of(action)
);
}

Expand Down

0 comments on commit 443c300

Please sign in to comment.