2
0
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:
Sean
2017-09-08 12:59:10 -07:00
parent 47fb79e0ee
commit 6283e1e3fd
+1 -1
View File
@@ -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)
}