Skip to content

Commit

Permalink
Fix cache deletion for script URLs with query parameters (#7107)
Browse files Browse the repository at this point in the history
  • Loading branch information
marklundin authored Nov 13, 2024
1 parent 1939666 commit fb5962c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/framework/handlers/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class ScriptHandler extends ResourceHandler {
callback(null, obj, extra);

// no cache for scripts
delete self._loader._cache[ResourceLoader.makeKey(url, 'script')];
const urlWithoutEndHash = url.split('&hash=')[0];
delete self._loader._cache[ResourceLoader.makeKey(urlWithoutEndHash, 'script')];
} else {
callback(err);
}
Expand Down

0 comments on commit fb5962c

Please sign in to comment.