Pitu 6 лет назад
Родитель
Сommit
a142078f64
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      src/site/store/index.js

+ 1 - 5
src/site/store/index.js

@@ -17,20 +17,16 @@ export const mutations = {
 	},
 	user(state, payload) {
 		if (!payload) {
-			state.user = {};
-			localStorage.removeItem('lolisafe-user');
+			state.user = null;
 			return;
 		}
-		localStorage.setItem('lolisafe-user', JSON.stringify(payload));
 		state.user = payload;
 	},
 	token(state, payload) {
 		if (!payload) {
-			localStorage.removeItem('lolisafe-token');
 			state.token = null;
 			return;
 		}
-		localStorage.setItem('lolisafe-token', payload);
 		setAuthorizationHeader(payload);
 		state.token = payload;
 	},