SocketCluster / socketcluster-client

JavaScript client for SocketCluster
MIT License
292 stars 91 forks source link

Check if the client is run in a browser before trying to access cookies #16

Closed Tenzer closed 8 years ago

Tenzer commented 9 years ago

This just fixes a silly bug when trying to connect to a SocketCluster 1 server from Node.js, which uses authorization. In such a case the program will die because document.cookie doesn't exist, so I have added a check for that.

mvaullerin commented 9 years ago

+1 Very usefull to do stress tests.

jondubois commented 9 years ago

@Tenzer I will try to merge it in manually and publish on npm this week. Thanks for that.

Tenzer commented 8 years ago

@jondubois Any updates on this? It would be nice to just use the package from NPM rather than having to install from my own fork :)

jondubois commented 8 years ago

I'll try to get this merged soon. I haven't had any time to focus on SC1 until now.

Tenzer commented 8 years ago

Sounds good :)

jondubois commented 8 years ago

Ok, this was merged manually in in v1.4.0 see https://github.com/SocketCluster/socketcluster-client/commits/sc1

Tenzer commented 8 years ago

Thanks!