From 340f05b8d906a112ca94bfed68bce621f8d64341 Mon Sep 17 00:00:00 2001 From: logsol Date: Mon, 22 Dec 2014 02:43:12 +0100 Subject: [PATCH] fixed some bugs related to use strict --- app/Lib/Utilities/Extensions.js | 2 +- app/Server/Coordinator.js | 3 +-- channel.js | 4 +--- server.js | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/Lib/Utilities/Extensions.js b/app/Lib/Utilities/Extensions.js index 1f9c032..1cf9c9b 100755 --- a/app/Lib/Utilities/Extensions.js +++ b/app/Lib/Utilities/Extensions.js @@ -8,7 +8,7 @@ function() { return f + this.substr(1); } - if(GLOBALS.context == "Channel") { + if(typeof process !== 'undefined') { console.checkpoint = function (s) { console.log(' \033[32mbeep - \033[0m' + s); diff --git a/app/Server/Coordinator.js b/app/Server/Coordinator.js index 6262d35..cbd039d 100644 --- a/app/Server/Coordinator.js +++ b/app/Server/Coordinator.js @@ -1,12 +1,11 @@ define([ "Server/User", - "Game/Channel/Channel", "Server/PipeToChannel", "Lib/Utilities/NotificationCenter", "Game/Config/Settings" ], -function (User, Channel, PipeToChannel, Nc, Settings) { +function (User, PipeToChannel, Nc, Settings) { "use strict"; diff --git a/channel.js b/channel.js index c68ebbb..3294623 100755 --- a/channel.js +++ b/channel.js @@ -1,6 +1,4 @@ -"use strict"; - -var GLOBALS = { context: "Channel" }; +GLOBALS = { context: "Channel" }; var requirejs = require('requirejs'); requirejs.config({ diff --git a/server.js b/server.js index 90a2ad2..bfae3a0 100755 --- a/server.js +++ b/server.js @@ -1,4 +1,4 @@ -"use strict"; +"use strict" var GLOBALS = { context: "Channel" }; var requirejs = require('requirejs');