Skip to content

Commit

Permalink
fix(store): check before reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and kerry-emqx committed Dec 22, 2021
1 parent 60526ac commit 7a70db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default createStore({
SET_LANGUAGE(state, lang) {
localStorage.setItem('language', lang)
lang ?? localStorage.removeItem('language')
if (state.lang !== lang) {
if (lang && state.lang !== lang) {
location.reload()
}
},
Expand Down

0 comments on commit 7a70db1

Please sign in to comment.