switch to os shim for safety (#1136)

* switch to os shim for safety

* Update Client.js
This commit is contained in:
Gus Caplan
2017-01-26 15:21:43 -06:00
committed by Amish Shah
parent ba11f76284
commit 87b600f78f
4 changed files with 5 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ exports.DefaultOptions = {
*/
ws: {
large_threshold: 250,
compress: typeof window === 'undefined',
compress: require('os').platform() !== 'browser',
properties: {
$os: process ? process.platform : 'discord.js',
$browser: 'discord.js',