2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-05-20 12:09:40 +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
+2 -1
View File
@@ -1,3 +1,4 @@
import assign from 'object-assign'
import Vue from 'vue'
import VueMeta from 'vue-meta'
import Router from 'vue-router'
@@ -51,6 +52,6 @@ const App = {
`
}
const app = new Vue(Object.assign(App, { router }))
const app = new Vue(assign(App, { router }))
app.$mount('#app')
+2 -1
View File
@@ -1,8 +1,9 @@
import assign from 'object-assign'
import Vue from 'vue'
import store from './store'
import router from './router'
import App from './App.vue'
const app = new Vue(Object.assign(App, { router, store }))
const app = new Vue(assign(App, { router, store }))
app.$mount('#app')
+2 -1
View File
@@ -5,7 +5,8 @@
"author": "Declan de Wet <declandewet@me.com>",
"bugs": "https://github.com/declandewet/vue-meta/issues",
"dependencies": {
"deepmerge": "^1.2.0"
"deepmerge": "^1.2.0",
"object-assign": "^4.1.0"
},
"devDependencies": {
"babel-cli": "^6.18.0",
+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
+1 -1
View File
@@ -3567,7 +3567,7 @@ oauth-sign@~0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
object-assign, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"