Skip to content

Commit

Permalink
fix(rstream): Fix unbound this in method call expression
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew8er committed Aug 27, 2018
1 parent 917d81d commit 34a97b4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/rstream/src/subs/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ export class Resolver<T> extends Subscription<Promise<T>, T> {
DEBUG && console.log(`resolved value in ${State[this.state]} state (${x})`);
}
},
(e) => (this.fail || this.error)(e)
(e) => {
if (this.fail) {
this.fail(e);
}
else {
this.error(e);
}
}
);
}

Expand Down

0 comments on commit 34a97b4

Please sign in to comment.