Skip to content

Commit

Permalink
fix: error in console when initial locale not set
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Bassett <[email protected]>
  • Loading branch information
cadriel committed Mar 28, 2021
1 parent 08d2b8b commit d1b0560
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/store/config/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export const actions: ActionTree<ConfigState, RootState> = {
}

// Set the correct language.
dispatch('onLocaleChange', payload.general.locale)
if (
payload.general &&
payload.general.locale
) {
dispatch('onLocaleChange', payload.general.locale)
}
},

/**
Expand Down

0 comments on commit d1b0560

Please sign in to comment.