There was an error while loading. Please reload this page.
1 parent 4dad65c commit 3afca81Copy full SHA for 3afca81
packages/react-scripts/template/src/registerServiceWorker.ts
@@ -23,7 +23,7 @@ export default function register() {
23
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
24
// The URL constructor is available in all browsers that support SW.
25
const publicUrl = new URL(
26
- process.env.PUBLIC_URL || '',
+ process.env.PUBLIC_URL!,
27
window.location.toString()
28
);
29
if (publicUrl.origin !== window.location.origin) {
0 commit comments