From d1b0560c99b853142225fbfee0b28a24d726e66c Mon Sep 17 00:00:00 2001 From: Craig Bassett Date: Sun, 28 Mar 2021 11:34:41 -0500 Subject: [PATCH] fix: error in console when initial locale not set Signed-off-by: Craig Bassett --- src/store/config/actions.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/config/actions.ts b/src/store/config/actions.ts index 4afe74217f..c4906bfead 100644 --- a/src/store/config/actions.ts +++ b/src/store/config/actions.ts @@ -27,7 +27,12 @@ export const actions: ActionTree = { } // Set the correct language. - dispatch('onLocaleChange', payload.general.locale) + if ( + payload.general && + payload.general.locale + ) { + dispatch('onLocaleChange', payload.general.locale) + } }, /**