2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-18 07:20:34 +03:00
This commit is contained in:
Sébastien Chopin
2018-01-08 08:41:45 +01:00
parent 3eaf8a9b33
commit a9ba6f5aba
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ export default function _updateTags (options = {}) {
} else {
newElement.appendChild(document.createTextNode(tag.cssText))
}
} else if ([options.tagIDKeyName, 'body'].includes(attr)) {
} else if ([options.tagIDKeyName, 'body'].indexOf(attr) !== -1) {
const _attr = `data-${attr}`
const value = (typeof tag[attr] === 'undefined') ? '' : tag[attr]
newElement.setAttribute(_attr, value)
+1 -1
View File
@@ -24,7 +24,7 @@ export default function _tagGenerator (options = {}) {
return attrsStr
// these form the attribute list for this tag
default:
if ([options.tagIDKeyName, 'body'].includes(attr)) {
if ([options.tagIDKeyName, 'body'].indexOf(attr) !== -1) {
return `${attrsStr} data-${attr}="${tag[attr]}"`
}
return typeof tag[attr] === 'undefined'