2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-05-30 04:34:05 +03:00

use object-assign ponyfill

This commit is contained in:
Declan de Wet
2016-11-08 13:17:10 +02:00
parent 1e235425d7
commit fa290273df
5 changed files with 10 additions and 5 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
import assign from 'object-assign'
/**
* Recursively shallow-merges component object with it's children component objects.
* This function is responsible for obtaining the `this` context of metaInfo props when
@@ -9,7 +11,7 @@
export default function mergeComponentData (component) {
if (component.$children.length) {
return component.$children.reduce((data, child) => {
return Object.assign({}, data, mergeComponentData(child))
return assign({}, data, mergeComponentData(child))
}, component)
}
return component