[FIX] website_event_track_online: wrong variable name in ServiceWorker

When switching to offline-mode, an "ReferenceError: requestCopy is not
defined" error is thrown in `service-worker.js`.

This commit fixes a variable left to its original name after extraction
to the `matchCache` method (see commit
odoo/odoo@f538a551b1 ).

closes odoo/odoo#55659

X-original-commit: 48e02f6a334af66bc0a62a4884d28adbe0177ee9
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
This commit is contained in:
Pierre Paridans
2020-08-09 22:21:03 +00:00
parent 1af543a399
commit 7a14ecd749
@@ -153,7 +153,7 @@ const matchCache = async (request) => {
return await cache.match(request);
}
if (isCachableURL(request.url)) {
const serializedRequest = await serializeRequest(requestCopy);
const serializedRequest = await serializeRequest(request);
const cachedResponse = await get(buildCacheKey(serializedRequest), cacheStore);
if (cachedResponse) {
return deserializeResponse(cachedResponse);