Skip to content

Commit

Permalink
Fix select field options translation saving order to prevent stale va…
Browse files Browse the repository at this point in the history
…lues
  • Loading branch information
Fajfa committed Jul 19, 2023
1 parent 295defc commit 311c879
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -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
Expand All @@ -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()
})
}
},
Expand Down

0 comments on commit 311c879

Please sign in to comment.