Merge pull request #677 from trheyi/main
refactor: Add default BuildContext if none provided in TranslateMarks…
This commit is contained in:
commit
7584e32ff1
1 changed files with 4 additions and 0 deletions
|
|
@ -290,6 +290,10 @@ func (page *Page) TranslateMarks(ctx *BuildContext, option *BuildOption, doc *go
|
|||
return nil
|
||||
}
|
||||
|
||||
if ctx == nil {
|
||||
ctx = NewBuildContext(nil)
|
||||
}
|
||||
|
||||
if ctx.translations == nil {
|
||||
ctx.translations = []Translation{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue