Skip to content

Commit

Permalink
Hoist upgrade handler into current scope by using an arrow function (#27
Browse files Browse the repository at this point in the history
)
  • Loading branch information
daffl committed Aug 29, 2018
1 parent c527778 commit fe15f65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/authentication-client/src/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Passport {
}
});

function socketUpgradeHandler () {
const socketUpgradeHandler = () => {
socket.io.engine.on('upgrade', () => {
debug('Socket upgrading');

Expand All @@ -73,7 +73,7 @@ export default class Passport {
});
}
});
}
};

if (socket.io && socket.io.engine) {
socketUpgradeHandler();
Expand Down

0 comments on commit fe15f65

Please sign in to comment.