From 5508cb1bf94b5ed82688d50ce2aacbfb99b5ff72 Mon Sep 17 00:00:00 2001 From: Kevin Simper Date: Fri, 14 Nov 2014 15:43:25 +0100 Subject: [PATCH] If window is not defined --- src/crafty.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crafty.js b/src/crafty.js index 0e057f54..d3d32b2d 100644 --- a/src/crafty.js +++ b/src/crafty.js @@ -29,5 +29,6 @@ require('./time'); require('./version'); require('./viewport'); -window.Crafty = Crafty; +if(window) window.Crafty = Crafty; + module.exports = Crafty; \ No newline at end of file