diff --git a/nts.js b/nts.js index bea4c726..aff17017 100644 --- a/nts.js +++ b/nts.js @@ -2,8 +2,10 @@ var env; if(typeof global !== "undefined"){ env = global } - if(typeof require !== "undefined"){ var Gun = require('./gun') } if(typeof window !== "undefined"){ var Gun = (env = window).Gun } + else { + if(typeof require !== "undefined"){ var Gun = require('./gun') } + } Gun.on('opt', function(at){ this.to.next(at); @@ -43,4 +45,4 @@ }; ping(); }); // test by opening up examples/game/nts.html on devices that aren't NTP synced. -}()); \ No newline at end of file +}());