diff --git a/src/MainUI.ts b/src/MainUI.ts
index 26537bc..b83a20e 100644
--- a/src/MainUI.ts
+++ b/src/MainUI.ts
@@ -1,24 +1,25 @@
///
+declare var global: any;
+declare var module: any;
+
if (typeof window != "undefined") {
// If jasmine is not present, ignore describe
(window).describe = (window).describe || function () { };
-}
-
-declare var global: any;
-if (typeof global != "undefined") {
- // In node, does not extend Phaser classes
- var handler = {
- get(target: any, name: any) {
- return function () { }
+} else {
+ if (typeof global != "undefined") {
+ // In node, does not extend Phaser classes
+ var handler = {
+ get(target: any, name: any) {
+ return function () { }
+ }
}
+ global.Phaser = new Proxy({}, handler);
}
- global.Phaser = new Proxy({}, handler);
-}
-declare var module: any;
-if (typeof module != "undefined") {
- module.exports = { TK };
+ if (typeof module != "undefined") {
+ module.exports = { TK };
+ }
}
module TK.SpaceTac {
diff --git a/tsconfig.json b/tsconfig.json
index 5a2418c..cdbfaf5 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,7 +13,7 @@
"dom",
"es6"
],
- "target": "es6"
+ "target": "es5"
},
"include": [
"src/**/*.ts"