We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3838e96 commit c134290Copy full SHA for c134290
src/override.js
@@ -37,6 +37,7 @@ export default function (Vue) {
37
// 1.0 only: enable route mixins
38
const strats = Vue.config.optionMergeStrategies
39
const hooksToMergeRE = /^(data|activate|deactivate)$/
40
+
41
if (strats) {
42
strats.route = (parentVal, childVal) => {
43
if (!childVal) return parentVal
@@ -46,6 +47,8 @@ export default function (Vue) {
46
47
for (let key in childVal) {
48
let a = ret[key]
49
let b = childVal[key]
50
+ // for data, activate and deactivate, we need to merge them into
51
+ // arrays similar to lifecycle hooks.
52
if (a && hooksToMergeRE.test(key)) {
53
ret[key] = (_.isArray(a) ? a : [a]).concat(b)
54
} else {
0 commit comments