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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user