Skip to content

Commit

Permalink
fix(studio-bundles): Enforce cache key for lodash.memoize
Browse files Browse the repository at this point in the history
GitOrigin-RevId: e6ca252d936bbd5429028a5396f19fd1785624cb
  • Loading branch information
FMota0 authored and actions-user committed Feb 17, 2025
1 parent 46643d3 commit 0dbba61
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions platform/wab/src/wab/client/components/studio/studio-bundles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ const fetchLiveFrameClient = memoizeOne(() =>
).then((res) => res.text())
);

const fetchHostLessPkg = memoize(async (pkg: string, version: string) => {
return fetch(
`${getPublicUrl()}/static/canvas-packages/build/${pkg}${version}.${COMMITHASH}.js`
).then((res) => res.text());
});
const fetchHostLessPkg = memoize(
async (pkg: string, version: string) => {
return fetch(
`${getPublicUrl()}/static/canvas-packages/build/${pkg}${version}.${COMMITHASH}.js`
).then((res) => res.text());
},
(pkg, version) => `${pkg}${version}`
);

export function getCanvasPkgs() {
return fetchCanvasPkgs();
Expand Down

0 comments on commit 0dbba61

Please sign in to comment.