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

馃攢 Merge tag '3.0.28' into develop

馃悰 Add the facultative chaining in the condition
parents 80193ef9 8a84377c
Pipeline #69973 passed with stage
in 15 seconds
{
"name": "@vue-unistra/formbuilder",
"version": "3.0.27",
"version": "3.0.28",
"main": "dist/index.js",
"files": [
"dist/*",
......
......@@ -62,14 +62,14 @@ export const messagesGetter: GetterTree<FormState, RootState> = {
) => string => {
return (id, prop, type = 'fields'): string => {
let translation: string = '';
if (state.messages.current && state.messages.locales[state.messages.current][id]) {
if (state.messages.current && state.messages.locales?.[state.messages.current]?.[id]) {
translation = <string | undefined>(state.messages.locales?.[state.messages.current]?.[id] as Locale)?.[prop] || '';
}
if (
translation === '' &&
state.messages.current !== state.messages.defaultLocale &&
state.messages.locales[state.messages.defaultLocale][id]
state.messages.locales?.[state.messages.defaultLocale]?.[id]
) {
translation = <string>(state.messages.locales?.[state.messages.defaultLocale]?.[id] as Locale)?.[prop] || '';
}
......
Markdown is supported
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