Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new URL type error in Safari #566

Merged
merged 2 commits into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/modern-gorillas-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@frontity/google-ad-manager": patch
"@frontity/head-tags": patch
"@frontity/wp-comments": patch
"@frontity/wp-source": patch
---

Do not import `URL` from `frontity` anymore.
5 changes: 5 additions & 0 deletions .changeset/unlucky-cups-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frontity": patch
---

Fix URL class wrapper in Safari.
3 changes: 2 additions & 1 deletion packages/frontity/src/utils/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class FrontityURL extends URL {
warn(
"Importing `URL` from Frontity has been deprecated. Please use `new URL()` instead."
);
super(input, base);
// Calling `new URL("http://some.url", undefined)` fails in Sarafi.
base ? super(input, base) : super(input);
}
}

Expand Down