LibWeb: Avoid dereferencing an empty optional URL

Here, "null" means the empty optional. We don't need to also check if
the URL is valid; the url will be null if it was originally invalid.
This commit is contained in:
Timothy Flynn
2024-12-11 12:04:02 -05:00
committed by Tim Flynn
parent 0bc55424c8
commit 943ec820fc
Notes: github-actions[bot] 2024-12-11 17:34:46 +00:00
3 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
<script src="../include.js"></script>
<script>
test(() => {
const a = document.createElement("a");
a.href = "http://foo:b/c";
println(`href="${a.href}"`);
});
</script>