aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-04-21 21:57:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-04-21 21:57:58 -0700
commitfdf67028ee1b6a8fc0bb67773dd241a80d1ff2f8 (patch)
treef4f670089aa4c1e2b62d8053309557212867ff6f /src/jsifier.js
parent93a5277fc64371819e38262b4b94e7e57f6b8305 (diff)
do not add empty lines for library dependencies already handled
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 592433e1..77d67bec 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -432,7 +432,7 @@ function JSify(data, functionsOnly, givenFunctions) {
} else {
ident = '_' + ident;
}
- var text = (deps ? '\n' + deps.map(addFromLibrary).join('\n') : '');
+ var text = (deps ? '\n' + deps.map(addFromLibrary).filter(function(x) { return x != '' }).join('\n') : '');
text += isFunction ? snippet : 'var ' + ident + '=' + snippet + ';';
if (ident in EXPORTED_FUNCTIONS) {
text += '\nModule["' + ident + '"] = ' + ident + ';';