aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jsifier.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 5a16e484..86568203 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -423,7 +423,9 @@ function JSify(data, functionsOnly, givenFunctions) {
deps.push(snippet);
snippet = '_' + snippet;
}
- if (ASM_JS) Functions.libraryFunctions[ident] = 1;
+ if (ASM_JS && typeof LibraryManager.library[redirectedIdent] == 'function') {
+ Functions.libraryFunctions[ident] = 1;
+ }
} else if (typeof snippet === 'object') {
snippet = stringifyWithFunctions(snippet);
} else if (typeof snippet === 'function') {