Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoeter committed Aug 14, 2018
1 parent 86e5d47 commit 5faae55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const notifierToObservable = (absintheSocket, onError, onStart) => notifier => {
};

return new Observable(subscriber => {
observer.onAbort = subscriber.error;
observer.onAbort = subscriber.error.bind(subscriber);
observer.onResult = onResult(notifier, subscriber);
observe(absintheSocket, notifier, observer);

Expand Down
6 changes: 3 additions & 3 deletions packages/socket/src/toObservable.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const toObservable = <Result>(
notifier: Notifier<Result>,
{onError, onStart, unsubscribe}: $Shape<Options<Result>> = {}
) =>
new Observable(observer => {
new Observable(subscriber => {
observe(absintheSocket, notifier, {
onError,
onStart,
onAbort: observer.error,
onResult: onResult(notifier, observer)
onAbort: subscriber.error.bind(subscriber),
onResult: onResult(notifier, subscriber)
});

return unsubscribe;
Expand Down

0 comments on commit 5faae55

Please sign in to comment.