diff --git a/Viewer/e.js b/Viewer/e.js index c0d05f99..7a9c4dca 100644 --- a/Viewer/e.js +++ b/Viewer/e.js @@ -9,13 +9,14 @@ **********************************************************************/ // Global scope pollution test... -global.__global = {...global} -global.scopeDiff = function(cur=global, base=__global){ - return Object.keys(cur) - .filter(function(k){ return base[k] !== cur[k] }) - .reduce(function(res, k){ - res[k] = cur[k] - return res }, {})} +if(process.env.IMAGEGRID_DEBUG){ + global.__global = {...global} + global.scopeDiff = function(cur=global, base=__global){ + return Object.keys(cur) + .filter(function(k){ return base[k] !== cur[k] }) + .reduce(function(res, k){ + res[k] = cur[k] + return res }, {})} } /*********************************************************************/ diff --git a/Viewer/ig.js b/Viewer/ig.js index 404c07eb..80342b8f 100755 --- a/Viewer/ig.js +++ b/Viewer/ig.js @@ -9,13 +9,14 @@ //var DEBUG = DEBUG != null ? DEBUG : true // Global scope pollution test... -global.__global = global.__global || {...global} -global.scopeDiff = function(cur=global, base=__global){ - return Object.keys(cur) - .filter(function(k){ return base[k] !== cur[k] }) - .reduce(function(res, k){ - res[k] = cur[k] - return res }, {})} +if(process.env.IMAGEGRID_DEBUG){ + global.__global = global.__global || {...global} + global.scopeDiff = function(cur=global, base=__global){ + return Object.keys(cur) + .filter(function(k){ return base[k] !== cur[k] }) + .reduce(function(res, k){ + res[k] = cur[k] + return res }, {})} } /*********************************************************************/ diff --git a/Viewer/index.html b/Viewer/index.html index b484ae02..6de9e757 100755 --- a/Viewer/index.html +++ b/Viewer/index.html @@ -31,7 +31,7 @@ - +