Skip to content

Commit 8818400

Browse files
GertSallaertsredonkulus
authored andcommitted
Fix passing of eventOptions (#56)
1 parent f197c22 commit 8818400

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/mainEventConnectors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ function connectThrottle(throttledEvent, cb, ctx, throttledMainEvent) {
9090
* @param {String} event - A subscribe event.
9191
* @param {Object} eventOptions - An options pass to event listener
9292
*/
93-
function connectContinuousEvent(target, mainEvent, event, eventOptions) {
94-
return function throttleEvent(throttleRate, cb, options) {
93+
function connectContinuousEvent(target, mainEvent, event) {
94+
return function throttleEvent(throttleRate, cb, options, eventOptions) {
9595
const context = options.context;
9696
const domTarget = options.target;
9797
const domId = domTarget && getHash(domTarget);
@@ -155,7 +155,7 @@ function connectContinuousEvent(target, mainEvent, event, eventOptions) {
155155
}
156156

157157
function connectDiscreteEvent(target, event) {
158-
return function throttleEvent(throttleRate, cb, options) {
158+
return function throttleEvent(throttleRate, cb, options, eventOptions) {
159159
const context = options.context;
160160
const domTarget = options.target;
161161
const domId = domTarget && getHash(domTarget);
@@ -177,7 +177,7 @@ function connectDiscreteEvent(target, event) {
177177
EE.emit(throttledEvent, e, ae);
178178
}
179179

180-
listeners[throttledEvent] = listen(domTarget || target, event, handler);
180+
listeners[throttledEvent] = listen(domTarget || target, event, handler, eventOptions);
181181
return remover;
182182
};
183183
}

0 commit comments

Comments
 (0)