Skip to content

Commit

Permalink
Fix passing of eventOptions (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
GertSallaerts authored and redonkulus committed Sep 24, 2018
1 parent f197c22 commit 8818400
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mainEventConnectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ function connectThrottle(throttledEvent, cb, ctx, throttledMainEvent) {
* @param {String} event - A subscribe event.
* @param {Object} eventOptions - An options pass to event listener
*/
function connectContinuousEvent(target, mainEvent, event, eventOptions) {
return function throttleEvent(throttleRate, cb, options) {
function connectContinuousEvent(target, mainEvent, event) {
return function throttleEvent(throttleRate, cb, options, eventOptions) {
const context = options.context;
const domTarget = options.target;
const domId = domTarget && getHash(domTarget);
Expand Down Expand Up @@ -155,7 +155,7 @@ function connectContinuousEvent(target, mainEvent, event, eventOptions) {
}

function connectDiscreteEvent(target, event) {
return function throttleEvent(throttleRate, cb, options) {
return function throttleEvent(throttleRate, cb, options, eventOptions) {
const context = options.context;
const domTarget = options.target;
const domId = domTarget && getHash(domTarget);
Expand All @@ -177,7 +177,7 @@ function connectDiscreteEvent(target, event) {
EE.emit(throttledEvent, e, ae);
}

listeners[throttledEvent] = listen(domTarget || target, event, handler);
listeners[throttledEvent] = listen(domTarget || target, event, handler, eventOptions);
return remover;
};
}
Expand Down

0 comments on commit 8818400

Please sign in to comment.