Commit cbd34af8 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

ServiceWorker: Decode requested url

parent c342a011
...@@ -50,7 +50,7 @@ var global = self, window = self; ...@@ -50,7 +50,7 @@ var global = self, window = self;
}); });
self.addEventListener("fetch", function (event) { self.addEventListener("fetch", function (event) {
var relative_url = event.request.url.split("#")[0] var relative_url = decodeURI(event.request.url.split("#")[0])
.replace(self.registration.scope, "") .replace(self.registration.scope, "")
if (relative_url[relative_url.length - 1] === "/" || relative_url === "") { if (relative_url[relative_url.length - 1] === "/" || relative_url === "") {
relative_url = relative_url + "index.html"; relative_url = relative_url + "index.html";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment