From f67fcecdddaa3b9d071a72f30a73f727671648d0 Mon Sep 17 00:00:00 2001 From: tecc Date: Wed, 28 Sep 2022 00:06:05 +0200 Subject: [PATCH] fix(profiles): Probably definite fix for profile editor --- routes/profileEditor.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/routes/profileEditor.vue b/routes/profileEditor.vue index 06432e4f5..fdb41396f 100644 --- a/routes/profileEditor.vue +++ b/routes/profileEditor.vue @@ -228,7 +228,7 @@

profile.column {{i + 1}}

- + @@ -260,6 +260,16 @@ } }) + function coerceWords(words) { + for (let i = 0; i < 4; i++) { + words[i] ??= { + header: null, + values: [] + } + } + return words; + } + const buildProfile = (profiles, currentLocale) => { for (let locale in profiles) { if (!profiles.hasOwnProperty(locale)) { @@ -275,7 +285,7 @@ links: profile.links, flags: profile.flags, customFlags: profile.customFlags, - words: profile.words, + words: coerceWords(profile.words), teamName: profile.teamName, footerName: profile.footerName, footerAreas: profile.footerAreas,