Skip to content

Commit 81b6467

Browse files
committed
[core] fix: <base> elements may not have an href property
1 parent 5dc6a2d commit 81b6467

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/client/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export class ScramjetClient {
220220
);
221221
if (base) {
222222
let url = base.getAttribute("href");
223+
if (!url) return client.url;
223224
const frag = url.indexOf("#");
224225
url = url.substring(0, frag === -1 ? undefined : frag);
225226
if (!url) return client.url;

0 commit comments

Comments
 (0)