We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f13a916 + 5a28d32 commit 1f54e10Copy full SHA for 1f54e10
.changeset/heavy-otters-hang.md
@@ -0,0 +1,5 @@
1
+---
2
+"@farfetched/core": patch
3
4
+
5
+Add workaround for Safari 14.0 bugged implementation of URL constructor
packages/core/src/fetch/lib.ts
@@ -93,8 +93,14 @@ export function formatUrl(
93
urlString = `${url}?${queryString}`;
94
}
95
96
+ /**
97
+ * Workararound for Safari 14.0
98
+ * @see https://github.com/igorkamyshev/farfetched/issues/528
99
+ */
100
+ const urlArgs = [urlString, urlBase].filter(Boolean) as [string, string];
101
102
try {
- return new URL(urlString, urlBase);
103
+ return new URL(...urlArgs);
104
} catch (e) {
105
throw configurationError({
106
reason: 'Invalid URL',
0 commit comments