Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit e2e1d68

Browse files
authored
Mini Cart block: add ?ver= query param to script URLs (#4689)
1 parent e9787a0 commit e2e1d68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/js/base/utils/lazy-load-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const lazyLoadScript = ( {
123123
id: `${ handle }-js`,
124124
onerror: reject,
125125
onload,
126-
src: version ? `${ src }?${ version }` : src,
126+
src: version ? `${ src }?ver=${ version }` : src,
127127
} );
128128
} );
129129
};

assets/js/base/utils/preload-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const preloadScript = ( {
1919

2020
if ( handleScriptElements.length === 0 ) {
2121
const prefetchLink = document.createElement( 'link' );
22-
prefetchLink.href = version ? `${ src }?${ version }` : src;
22+
prefetchLink.href = version ? `${ src }?ver=${ version }` : src;
2323
prefetchLink.rel = 'preload';
2424
prefetchLink.as = 'script';
2525
prefetchLink.id = `${ handle }-js-prefetch`;

0 commit comments

Comments
 (0)