We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 494517a commit 4961cecCopy full SHA for 4961cec
src/utils/eventEmitter.js
@@ -124,7 +124,7 @@ export default function eventEmitter() {
124
if (typeof fn !== 'function') return this;
125
function wrapper(...args) {
126
off(event, wrapper);
127
- fn(...args);
+ fn.call(this, ...args);
128
}
129
return this.on(event, wrapper);
130
},
@@ -134,7 +134,7 @@ export default function eventEmitter() {
134
until(event, fn) {
135
136
137
- const ret = fn(...args);
+ const ret = fn.call(this, ...args);
138
if (ret instanceof Promise) {
139
ret.then((val) => val && off(event, wrapper));
140
} else if (ret) {
0 commit comments