mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-21 16:04:09 -08:00
JS: fix UMD wrapper for case when 'exports' exists, but is null
This commit is contained in:
parent
d33c491a33
commit
70540b2df0
|
@ -539,6 +539,7 @@ public class JavaScriptTarget implements TeaVMTarget, TeaVMJavaScriptHost {
|
|||
|
||||
writer.appendElseIf().append("typeof exports").ws()
|
||||
.append("===").ws().append("'object'").ws().append("&&").ws()
|
||||
.append("exports").ws().append("!==").ws().append("null").ws().append("&&").ws()
|
||||
.append("typeof exports.nodeName").ws().append("!==").ws().append("'string')").appendBlockStart();
|
||||
writer.append("module(global,").ws().append("exports");
|
||||
for (var moduleName : importedModules.keySet()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user