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 e04cb8a commit 0a23f18Copy full SHA for 0a23f18
src/utils/api/pub_sub.js
@@ -28,8 +28,8 @@ Pub_Sub.prototype.on = function (publisherName, fn) {
28
//oneSubscribe
29
Pub_Sub.prototype.one = function (publisherName, fn) {
30
if (typeof fn === 'function' && this._publishers.hasOwnProperty(publisherName)) {
31
- const _fn = param => {
32
- fn(param);
+ const _fn = function () {
+ fn.apply(this, arguments);
33
this.off(publisherName, _fn);
34
};
35
return this.on(publisherName, _fn);
0 commit comments