mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-23 01:30:33 +03:00
refactor: dont use Array.includes (#339)
its not supported in IE and not polyfilled in vue-meta v1
This commit is contained in:
@@ -43,10 +43,10 @@ export default function _tagGenerator (options = {}) {
|
|||||||
: `${attribute}="true" `
|
: `${attribute}="true" `
|
||||||
|
|
||||||
// these tags have no end tag
|
// these tags have no end tag
|
||||||
const hasEndTag = !['base', 'meta', 'link'].includes(type)
|
const hasEndTag = ['base', 'meta', 'link'].indexOf(type) === -1
|
||||||
|
|
||||||
// these tag types will have content inserted
|
// these tag types will have content inserted
|
||||||
const hasContent = hasEndTag && ['noscript', 'script', 'style'].includes(type)
|
const hasContent = hasEndTag && ['noscript', 'script', 'style'].indexOf(type) > -1
|
||||||
|
|
||||||
// the final string for this specific tag
|
// the final string for this specific tag
|
||||||
return !hasContent
|
return !hasContent
|
||||||
|
|||||||
Reference in New Issue
Block a user