LibWeb: Ensure requests modules is not empty before indexing into it

Regression from 5af613aa65

Fixes: #2676
This commit is contained in:
Shannon Booth
2024-12-02 00:24:48 +13:00
committed by Andreas Kling
parent 2ff03ea7d2
commit 30c8510725
4 changed files with 64 additions and 47 deletions

View File

@@ -0,0 +1,5 @@
// NOTE: Doesn't matter what this imports, but this imports itself so there is no import error in test logs.
import("./import-in-a-module.js");
const returnValue = "PASS! (Didn't crash)";
export default returnValue;

View File

@@ -0,0 +1,8 @@
<script src="../../include.js"></script>
<script type="module">
import m from "./import-in-a-module.js";
test(() => {
println(m);
});
</script>