Skip to content

Commit 0d95ee4

Browse files
committed
Merge branch 'release-2.14.7' into develop
2 parents d45c293 + 16bf8a2 commit 0d95ee4

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

client/modules/Preview/previewIndex.jsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ const App = () => {
5252
}
5353
}
5454

55+
function addCacheBustingToAssets(files) {
56+
const timestamp = new Date().getTime();
57+
return files.map((file) => {
58+
if (file.url) {
59+
return {
60+
...file,
61+
url: `${file.url}?v=${timestamp}`
62+
};
63+
}
64+
return file;
65+
});
66+
}
67+
5568
useEffect(() => {
5669
const unsubscribe = listen(handleMessageEvent);
5770
return function cleanup() {
@@ -62,7 +75,7 @@ const App = () => {
6275
<React.Fragment>
6376
<GlobalStyle />
6477
<EmbedFrame
65-
files={state}
78+
files={addCacheBustingToAssets(state)}
6679
isPlaying={isPlaying}
6780
basePath={basePath}
6881
gridOutput={gridOutput}

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.js-web-editor",
3-
"version": "2.14.6",
3+
"version": "2.14.7",
44
"description": "The web editor for p5.js.",
55
"scripts": {
66
"clean": "rimraf dist",

0 commit comments

Comments
 (0)