Преглед на файлове

update logout to clean the localstorage

Daniel Bohry преди 9 месеца
родител
ревизия
4f6be9a6c9
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      src/routes/logout/+page.svelte

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

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