You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: in EXPORT_ALL and maybe other cases we export earlier than in maybeExport; just check if it exists already before exporting, don't override something
Copy file name to clipboardExpand all lines: src/modules.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -280,7 +280,10 @@ function maybeExport(name) {
280
280
// stub with an error, so the user gets a message
281
281
// if it is used, that they should export it
282
282
if(ASSERTIONS){
283
-
return'Module["'+name+'"] = function() { abort("\''+name+'\' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS.") };';
283
+
// check if it already exists, to support EXPORT_ALL and other cases
284
+
// (we could optimize this, but in ASSERTIONS mode code size doesn't
285
+
// matter anyhow)
286
+
return'if (!Module["'+name+'"]) Module["'+name+'"] = function() { abort("\''+name+'\' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS.") };';
0 commit comments