Skip to content

Commit

Permalink
fix(fromEvent): pass options in unsubscribe
Browse files Browse the repository at this point in the history
Closes #3349
  • Loading branch information
cartant committed Mar 6, 2018
1 parent 35aba2b commit f1872b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/observable/fromEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function setupSubscription<T>(sourceObj: EventTargetLike, eventName: string,
} else if (isEventTarget(sourceObj)) {
const source = sourceObj;
sourceObj.addEventListener(eventName, handler as EventListener, options);
unsubscribe = () => source.removeEventListener(eventName, handler as EventListener);
unsubscribe = () => source.removeEventListener(eventName, handler as EventListener, options);
} else if (isJQueryStyleEventEmitter(sourceObj)) {
const source = sourceObj;
sourceObj.on(eventName, handler);
Expand Down

0 comments on commit f1872b0

Please sign in to comment.