diff options
-rw-r--r-- | src/jsifier.js | 3 |
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 + ';'; } |