Skip to content

Commit c134290

Browse files
committed
comments
1 parent 3838e96 commit c134290

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/override.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export default function (Vue) {
3737
// 1.0 only: enable route mixins
3838
const strats = Vue.config.optionMergeStrategies
3939
const hooksToMergeRE = /^(data|activate|deactivate)$/
40+
4041
if (strats) {
4142
strats.route = (parentVal, childVal) => {
4243
if (!childVal) return parentVal
@@ -46,6 +47,8 @@ export default function (Vue) {
4647
for (let key in childVal) {
4748
let a = ret[key]
4849
let b = childVal[key]
50+
// for data, activate and deactivate, we need to merge them into
51+
// arrays similar to lifecycle hooks.
4952
if (a && hooksToMergeRE.test(key)) {
5053
ret[key] = (_.isArray(a) ? a : [a]).concat(b)
5154
} else {

0 commit comments

Comments
 (0)