2
0
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:
Pim
2019-03-28 14:50:39 +01:00
committed by GitHub
parent 9d26cb674e
commit 3c6db84185
+2 -2
View File
@@ -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