mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-18 07:20:34 +03:00
fix: Issue #178
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user