File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/qwik/src/core/components Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const PrefetchServiceWorker = (opts: {
42
42
// the file 'qwik-prefetch-service-worker.js' is not located in /build/
43
43
resolvedOpts . path = baseUrl + resolvedOpts . path ;
44
44
}
45
- let code = PREFETCH_CODE . replace ( 'URL' , resolvedOpts . path ) ;
45
+ let code = PREFETCH_CODE . replace ( "'_URL_'" , JSON . stringify ( resolvedOpts . path ) ) ;
46
46
if ( ! isDev ) {
47
47
// consecutive spaces are indentation
48
48
code = code . replaceAll ( / \s \s + / gm, '' ) ;
@@ -67,7 +67,7 @@ const PREFETCH_CODE = /*#__PURE__*/ ((
67
67
c . getRegistrations ( ) . then ( ( registrations ) => {
68
68
registrations . forEach ( ( registration ) => {
69
69
if ( registration . active ) {
70
- if ( registration . active . scriptURL . endsWith ( 'URL ' ) ) {
70
+ if ( registration . active . scriptURL . endsWith ( '_URL_ ' ) ) {
71
71
registration . unregister ( ) . catch ( console . error ) ;
72
72
}
73
73
}
You can’t perform that action at this time.
0 commit comments