Explorar el Código

update logout to clean the localstorage

Daniel Bohry hace 9 meses
padre
commit
4f6be9a6c9
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      src/routes/logout/+page.svelte

+ 1 - 2
src/routes/logout/+page.svelte

@@ -3,8 +3,7 @@
     import {authentication} from '../store.js';
     import {authentication} from '../store.js';
 
 
     function logout() {
     function logout() {
-        authentication.set(null);
-        localStorage.removeItem('authentication');
+        localStorage.clear();
         window.location.href = "/login";
         window.location.href = "/login";
     }
     }