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

@@ -46,4 +46,4 @@ module.exports = {
Constants: require('./util/Constants'),
};
if (typeof window !== 'undefined') window.Discord = module.exports; // eslint-disable-line no-undef
if (require('os').platform() === 'browser') window.Discord = module.exports; // eslint-disable-line no-undef