mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-17 04:39:38 +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" `
|
||||
|
||||
// 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
|
||||
const hasContent = hasEndTag && ['noscript', 'script', 'style'].includes(type)
|
||||
const hasContent = hasEndTag && ['noscript', 'script', 'style'].indexOf(type) > -1
|
||||
|
||||
// the final string for this specific tag
|
||||
return !hasContent
|
||||
|
||||
Reference in New Issue
Block a user