Commit 1fc72be6 authored by MARCO Jonathan's avatar MARCO Jonathan
Browse files

馃悰 Fix the get default translation if current is empty

parent 1e98532a
Pipeline #66624 passed with stage
in 14 seconds
......@@ -63,7 +63,7 @@ export const messagesGetter: GetterTree<FormState, RootState> = {
return (id, prop, type = 'fields'): string => {
let translation: string = '';
if (state.messages.current && state.messages.locales[state.messages.current][id]) {
translation = <string>(state.messages.locales[state.messages.current][id] as Locale)[prop];
translation = <string | undefined>(state.messages.locales[state.messages.current][id] as Locale)[prop] || '';
}
if (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment