From 311c87988208dd6661829ae0dfe2f133b90cd3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Wed, 19 Jul 2023 17:10:44 +0200 Subject: [PATCH] Fix select field options translation saving order to prevent stale values --- .../src/components/Admin/Module/FieldSelectTranslator.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/web/compose/src/components/Admin/Module/FieldSelectTranslator.vue b/client/web/compose/src/components/Admin/Module/FieldSelectTranslator.vue index 467788c609..b52b0c1a31 100644 --- a/client/web/compose/src/components/Admin/Module/FieldSelectTranslator.vue +++ b/client/web/compose/src/components/Admin/Module/FieldSelectTranslator.vue @@ -128,8 +128,7 @@ export default { return this.$ComposeAPI .moduleUpdateTranslations({ namespaceID, moduleID, translations }) // re-fetch translations, sanitized and stripped - .then(() => this.fetcher()) - .then((translations) => { + .then(() => { // When translations are successfully saved, // scan changes and apply them back to the passed object // not the most elegant solution but is saves us from @@ -139,6 +138,7 @@ export default { // the logic there needs to be implemented; the idea is to encode // values from the set of translations back to the resource object moduleFieldSelectResTr(this.field, translations, this.currentLanguage, this.resource) + this.fetcher() }) } },