Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commitee0e8b5

Browse files
HcySunYangyyx990803
authored andcommitted
refactor: tweak data merge strategy (vuejs#6833)
* tweak: The value of this is always undefined* parentVal and childVal must have a presence, otherwise the strats.data policy function will not be executed
1 parent98ea0a3 commitee0e8b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/core/util/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function mergeDataOrFn (
8989
typeofparentVal==='function' ?parentVal.call(this) :parentVal
9090
)
9191
}
92-
}elseif(parentVal||childVal){
92+
}else{
9393
returnfunctionmergedInstanceDataFn(){
9494
// instance merge
9595
constinstanceData=typeofchildVal==='function'
@@ -123,7 +123,7 @@ strats.data = function (
123123

124124
returnparentVal
125125
}
126-
returnmergeDataOrFn.call(this,parentVal,childVal)
126+
returnmergeDataOrFn(parentVal,childVal)
127127
}
128128

129129
returnmergeDataOrFn(parentVal, childVal, vm)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp