mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-10 07:42:26 +03:00
feat: don't generate title tag if title is empty (#334)
* fix: not generate title tag if title is empty * fix: align title to document.title api * refactor: trim data
This commit is contained in:
@@ -11,7 +11,7 @@ export default function _titleGenerator (options = {}) {
|
||||
return function titleGenerator (type, data) {
|
||||
return {
|
||||
text () {
|
||||
return `<${type} ${attribute}="true">${data}</${type}>`
|
||||
return String(data).trim() ? `<${type} ${attribute}="true">${data}</${type}>` : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user