summaryrefslogtreecommitdiff
path: root/js/gulp/bundle.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-08-19 21:25:18 +0200
committerJose <jose@zeroc.com>2016-08-19 21:25:18 +0200
commitc8d32e04873be7938915c606027c84c8ab832f6b (patch)
treef862751cfaddcf5bb7b82a7c04a299d471f948d4 /js/gulp/bundle.js
parentFix ICE-7278 (diff)
downloadice-c8d32e04873be7938915c606027c84c8ab832f6b.tar.bz2
ice-c8d32e04873be7938915c606027c84c8ab832f6b.tar.xz
ice-c8d32e04873be7938915c606027c84c8ab832f6b.zip
ES6 mapping updates
Diffstat (limited to 'js/gulp/bundle.js')
-rw-r--r--js/gulp/bundle.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/gulp/bundle.js b/js/gulp/bundle.js
index df3763de5ba..b05ca2c9ea7 100644
--- a/js/gulp/bundle.js
+++ b/js/gulp/bundle.js
@@ -322,7 +322,7 @@ function bundle(args)
var sb = new StringBuffer();
sb.write(preamble);
- sb.write(" var __root = typeof(window) !== \"undefined\" ? window : self;\n");
+ sb.write(" var __root = typeof(window) !== \"undefined\" ? window : typeof(global) !== \"undefined\" ? global : typeof(self) !== \"undefined\" ? self : {};\n");
lineOffset += 3;
args.modules.forEach(
function(m){
@@ -378,7 +378,7 @@ function bundle(args)
// Get rid of require statements, the bundle include all required files,
// so require statements are not required.
//
- if(line.match(/var .* require\(".*"\).*;/))
+ if(line.match(/const .* require\(".*"\).*;/))
{
continue;
}
@@ -397,7 +397,7 @@ function bundle(args)
// Get rid of __M.module statements, in browser top level modules are
// global.
//
- if(line.match(/var .* = __M.module\(/))
+ if(line.match(/const .* = __M.module\(/))
{
if(line.lastIndexOf(";") === -1)
{