2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-19 08:30:33 +03:00

refactor: small improvements (mainly tests)

This commit is contained in:
pimlie
2019-03-08 23:14:24 +01:00
committed by Alexander Lichter
parent 5ad671169b
commit f490a48b99
6 changed files with 116 additions and 24 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ export function arrayMerge({ component, tagIDKeyName, metaTemplateKeyName, conte
}
// when sourceItem explictly defines contentKeyName or innerHTML as undefined, its
// an indication that we need to skip the default behaviour
// So we keep the targetItem and ignore/remove the sourceItem
// an indication that we need to skip the default behaviour or child has preference over parent
// which means we keep the targetItem and ignore/remove the sourceItem
if ((sourceItem.hasOwnProperty(contentKeyName) && sourceItem[contentKeyName] === undefined) ||
(sourceItem.hasOwnProperty('innerHTML') && sourceItem.innerHTML === undefined)) {
destination.push(targetItem)