Skip to content

Commit 0a27e12

Browse files
authored
Merge pull request #814 from lightpanda-io/root_module_nested_modules
Allow root modules to imported modules
2 parents 3f9b256 + e18c589 commit 0a27e12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/runtime/js.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,9 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
728728
if (try m.instantiate(v8_context, resolveModuleCallback) == false) {
729729
return error.ModuleInstantiationError;
730730
}
731-
731+
const arena = self.context_arena;
732+
const owned_url = try arena.dupe(u8, url);
733+
try self.module_identifier.putNoClobber(arena, m.getIdentityHash(), owned_url);
732734
_ = try m.evaluate(v8_context);
733735
}
734736

0 commit comments

Comments
 (0)