Skip to content

Commit 8036537

Browse files
committed
Polyfill
1 parent 7182695 commit 8036537

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

client/public/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"buildMajor":1,"buildMinor":125,"buildRevision":288,"buildTag":"dev","buildDate":"Sun Feb 02 2025","build":"1.125.288 dev"}
1+
{"buildMajor":1,"buildMinor":125,"buildRevision":291,"buildTag":"dev","buildDate":"Mon Feb 10 2025","build":"1.125.291 dev"}

client/src/index.jsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ import App from './App';
66
import reportWebVitals from './reportWebVitals';
77
import { reportVital } from './client/util/vitalreporter';
88

9+
// polyfill for url canParse
10+
if (!URL.canParse) {
11+
// eslint-disable-next-line no-console
12+
console.log('Polyfilling URL.canParse');
13+
URL.canParse = (url, base) => {
14+
try {
15+
// eslint-disable-next-line no-new
16+
new URL(url, base);
17+
return true;
18+
} catch {
19+
return false;
20+
}
21+
};
22+
}
23+
924
const root = ReactDOM.createRoot(document.getElementById('root'));
1025
root.render(
1126
<App />,

client/src/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"buildMajor":1,"buildMinor":125,"buildRevision":288,"buildTag":"dev","buildDate":"Sun Feb 02 2025","build":"1.125.288 dev"}
1+
{"buildMajor":1,"buildMinor":125,"buildRevision":291,"buildTag":"dev","buildDate":"Mon Feb 10 2025","build":"1.125.291 dev"}

0 commit comments

Comments
 (0)