From: Johannes Zellner Date: Mon, 8 Oct 2018 14:36:00 +0000 (+0200) Subject: Decode the path from the location hash first X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=4dce7a3d2e99f489245bc8b4c6611061b78aa8cf;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git Decode the path from the location hash first --- diff --git a/frontend/js/app.js b/frontend/js/app.js index 0a6ada1..7a80ba7 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -288,7 +288,7 @@ var app = new Vue({ getProfile(result.body.accessToken, function (error) { if (error) return console.error(error); - loadDirectory(window.location.hash.slice(1)); + loadDirectory(decode(window.location.hash.slice(1))); }); }); }, @@ -428,11 +428,11 @@ var app = new Vue({ getProfile(localStorage.accessToken, function (error) { if (error) return console.error(error); - loadDirectory(window.location.hash.slice(1)); + loadDirectory(decode(window.location.hash.slice(1))); }); $(window).on('hashchange', function () { - loadDirectory(window.location.hash.slice(1)); + loadDirectory(decode(window.location.hash.slice(1))); }); })();