Skip to content

Commit

Permalink
refactor: dont use Array.includes (#339)
Browse files Browse the repository at this point in the history
its not supported in IE and not polyfilled in vue-meta v1
  • Loading branch information
pimlie authored Mar 28, 2019
1 parent 9d26cb6 commit 3c6db84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/generators/tagGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c6db84

Please sign in to comment.