Skip to content

Commit

Permalink
Merge branch 'release-2.14.7' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
raclim committed Oct 8, 2024
2 parents d45c293 + 16bf8a2 commit 0d95ee4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
15 changes: 14 additions & 1 deletion client/modules/Preview/previewIndex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ const App = () => {
}
}

function addCacheBustingToAssets(files) {
const timestamp = new Date().getTime();
return files.map((file) => {
if (file.url) {
return {
...file,
url: `${file.url}?v=${timestamp}`
};
}
return file;
});
}

useEffect(() => {
const unsubscribe = listen(handleMessageEvent);
return function cleanup() {
Expand All @@ -62,7 +75,7 @@ const App = () => {
<React.Fragment>
<GlobalStyle />
<EmbedFrame
files={state}
files={addCacheBustingToAssets(state)}
isPlaying={isPlaying}
basePath={basePath}
gridOutput={gridOutput}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p5.js-web-editor",
"version": "2.14.6",
"version": "2.14.7",
"description": "The web editor for p5.js.",
"scripts": {
"clean": "rimraf dist",
Expand Down

0 comments on commit 0d95ee4

Please sign in to comment.