diff --git a/lib/global.js b/lib/global.js index ef76422..9e64e6a 100644 --- a/lib/global.js +++ b/lib/global.js @@ -3,7 +3,13 @@ var React = require('react'); var Global = React.createClass({ statics: { get: function(name) { - return window[name]; + if(typeof global !== 'undefined') { + return global[name]; + } else if(typeof window !== 'undefined') { + return window[name] + } else { + return null; + } } },