aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-10 14:20:06 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-10 14:21:24 -0800
commit453d7065c7da07fc432fbec562c861595798d042 (patch)
treed598864df3e9da58ba2e8631e55afb9003930adb /src/jsifier.js
parent513d0745230eb9c41af4d9b69ea5758689e25df1 (diff)
do not emit values for redirected library idents, they would not be used anyhow
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 83b65b5b..8702ee23 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -466,7 +466,8 @@ function JSify(data, functionsOnly, givenFunctions) {
ident = '_' + ident;
}
var text = (deps ? '\n' + deps.map(addFromLibrary).filter(function(x) { return x != '' }).join('\n') : '');
- text += isFunction ? snippet : 'var ' + ident + '=' + snippet + ';';
+ // redirected idents just need a var, but no value assigned to them - it would be unused
+ text += isFunction ? snippet : ('var ' + ident + (redirectedIdent ? '' : '=' + snippet) + ';');
if (EXPORT_ALL || (ident in EXPORTED_FUNCTIONS)) {
text += '\nModule["' + ident + '"] = ' + ident + ';';
}