Fix translation bug for block title and desc
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user