Fix translation bug for block title and desc

This commit is contained in:
Emmy Leke
2023-01-09 10:22:31 +01:00
parent ae6b2ac7cf
commit 5196e6a6d0
@@ -168,6 +168,8 @@ export default {
}
const updateBlockTranslations = block => {
if (block.blockID === NoID) return block
block.title = (find(`pageBlock.${block.blockID}.title`) || {}).message
block.description = (find(`pageBlock.${block.blockID}.description`) || {}).message
@@ -203,10 +205,10 @@ export default {
if (this.block) {
this.block = updateBlockTranslations(this.block)
} else {
this.page.blocks = this.page.blocks.map(block => updateBlockTranslations(block))
}
this.page.blocks = this.page.blocks.map(block => updateBlockTranslations(block))
return this.page
})
.then(page => {