mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-17 20:10:34 +03:00
Bind titleTemplate function call to component instance
This commit is contained in:
@@ -85,7 +85,7 @@ export default function _getMetaInfo (options = {}) {
|
||||
// replace title with populated template
|
||||
if (info.titleTemplate) {
|
||||
if (typeof info.titleTemplate === 'function') {
|
||||
info.title = info.titleTemplate(info.titleChunk)
|
||||
info.title = info.titleTemplate.call(component, info.titleChunk)
|
||||
} else {
|
||||
info.title = info.titleTemplate.replace(/%s/g, info.titleChunk)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user