mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-20 09:00:33 +03:00
fix: don't generate <title> tag if metaInfo.title is null or false (#409)
This commit is contained in:
committed by
Pim
parent
b150d82eec
commit
39ef28752b
@@ -39,6 +39,31 @@ describe('escaping', () => {
|
||||
})
|
||||
})
|
||||
|
||||
test('null title is left as it is', () => {
|
||||
const component = new Vue({
|
||||
metaInfo: {
|
||||
title: null
|
||||
}
|
||||
})
|
||||
|
||||
expect(getMetaInfo(component, [[/&/g, '&']])).toEqual({
|
||||
title: null,
|
||||
titleChunk: '',
|
||||
titleTemplate: '%s',
|
||||
htmlAttrs: {},
|
||||
headAttrs: {},
|
||||
bodyAttrs: {},
|
||||
meta: [],
|
||||
base: [],
|
||||
link: [],
|
||||
style: [],
|
||||
script: [],
|
||||
noscript: [],
|
||||
__dangerouslyDisableSanitizers: [],
|
||||
__dangerouslyDisableSanitizersByTagID: {}
|
||||
})
|
||||
})
|
||||
|
||||
test('special chars are escaped unless disabled by vmid', () => {
|
||||
const component = new Vue({
|
||||
metaInfo: {
|
||||
|
||||
Reference in New Issue
Block a user