Skip to content

Commit

Permalink
Instanceof not working in node again...
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWoolf committed Apr 28, 2016
1 parent 83b563b commit eab7465
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/lib/client/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,11 @@ var Auth = (function() {
this._ensureValidAuthCredentials(function(err, tokenDetails) {
/* RSA10g */
self.tokenParams.timestamp = null;
/* RTC8 */
if(self.force && !err && (self.client instanceof Realtime)) {
/* RTC8
* use self.client.connection as a proxy for (self.client instanceof Realtime),
* which is broken in node in some situations (for rest clients),
* presumably due to vm context issues. */
if(self.force && !err && self.client.connection) {
self.client.connection.connectionManager.onAuthUpdated();
}
callback(err, tokenDetails);
Expand Down

0 comments on commit eab7465

Please sign in to comment.