Skip to content

Commit c56a7f5

Browse files
authored
fix: Properly skip duplicate class id exports (#2065)
1 parent f3c0860 commit c56a7f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/compiler.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,11 @@ export class Compiler extends DiagnosticEmitter {
948948
module.addGlobal(internalName, TypeRef.I32, false, module.i32(classInstance.id));
949949
this.doneModuleExports.add(element);
950950
}
951-
module.addGlobalExport(internalName, prefix + name);
951+
952+
let exportName = prefix + name;
953+
if (!module.hasExport(exportName)) {
954+
module.addGlobalExport(internalName, exportName);
955+
}
952956
}
953957
break;
954958
}

0 commit comments

Comments
 (0)