diff --git a/src/client/updaters/attribute.js b/src/client/updaters/attribute.js index a06df9d..e3cf648 100644 --- a/src/client/updaters/attribute.js +++ b/src/client/updaters/attribute.js @@ -14,7 +14,7 @@ export default function updateAttribute({ attribute } = {}, attrs, tag) { const val = attrs[attr] || '' tag.setAttribute(attr, val) - if (vueMetaAttrs.indexOf(attr) === -1) { + if (!vueMetaAttrs.includes(attr)) { vueMetaAttrs.push(attr) } diff --git a/src/client/updaters/tag.js b/src/client/updaters/tag.js index 05aa85f..df3c044 100644 --- a/src/client/updaters/tag.js +++ b/src/client/updaters/tag.js @@ -44,7 +44,7 @@ export default function updateTag({ attribute, tagIDKeyName } = {}, type, tags, } else { newElement.appendChild(document.createTextNode(tag.cssText)) } - } else if ([tagIDKeyName, 'body'].indexOf(attr) !== -1) { + } else if ([tagIDKeyName, 'body'].includes(attr)) { const _attr = `data-${attr}` const value = (typeof tag[attr] === 'undefined') ? '' : tag[attr] newElement.setAttribute(_attr, value) diff --git a/src/shared/getMetaInfo.js b/src/shared/getMetaInfo.js index 8617037..14ff7ba 100644 --- a/src/shared/getMetaInfo.js +++ b/src/shared/getMetaInfo.js @@ -122,11 +122,11 @@ export default function getMetaInfo({ keyName, tagIDKeyName, metaTemplateKeyName // sanitizes potentially dangerous characters const escape = info => Object.keys(info).reduce((escaped, key) => { - let isDisabled = ref && ref.indexOf(key) > -1 + let isDisabled = ref && ref.includesOf(key) const tagID = info[tagIDKeyName] if (!isDisabled && tagID) { - isDisabled = refByTagID && refByTagID[tagID] && refByTagID[tagID].indexOf(key) > -1 + isDisabled = refByTagID && refByTagID[tagID] && refByTagID[tagID].includes(key) } const val = info[key]