Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribed event only return the first value when there is multiple argument in callback. #132

Open
eloitay opened this issue Jan 17, 2019 · 0 comments

Comments

@eloitay
Copy link

eloitay commented Jan 17, 2019

In the signalr.connection.js, at line 157.
SignalRConnection.prototype.listen =
/**
* @template T
* @param {?} listener
* @return {?}
/
function (listener) {
var _this = this;
if (listener == null) {
throw new Error('Failed to listen. Argument 'listener' can not be null');
}
var /
* @type {?} / callback = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_this.run(function () {
var /
* @type {?} / casted = null;
if (args.length > 0) {
casted = /
* @type {?} */ (args[0]); <---- this seems to be the issue but not sure if the behaviour is intended. I made the modification to args instead of args[0] and managed for it to work in my situation.
}
_this.log('SignalRConnection.proxy.on invoked. Calling listener next() ...');
console.log(casted)
listener.next(casted);
_this.log('listener next() called.');
}, _this._configuration.executeEventsInZone);
};
this.setListener(callback, listener);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant