Skip to content

Commit 6e7910e

Browse files
committed
fix bug with adding non-functions to libraryFunctions in ASM_JS
1 parent 006059d commit 6e7910e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/jsifier.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ function JSify(data, functionsOnly, givenFunctions) {
423423
deps.push(snippet);
424424
snippet = '_' + snippet;
425425
}
426-
if (ASM_JS) Functions.libraryFunctions[ident] = 1;
426+
if (ASM_JS && typeof LibraryManager.library[redirectedIdent] == 'function') {
427+
Functions.libraryFunctions[ident] = 1;
428+
}
427429
} else if (typeof snippet === 'object') {
428430
snippet = stringifyWithFunctions(snippet);
429431
} else if (typeof snippet === 'function') {

0 commit comments

Comments
 (0)