Skip to content

Commit

Permalink
refactor: replace Object.assign with extend (vuejs#8988)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue authored and lynxlangya committed May 30, 2024
1 parent ddd1d74 commit 87f2ce6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/runtime-core/src/componentPublicInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
return desc.get.call(instance.proxy)
} else {
const val = globalProperties[key]
return isFunction(val)
? Object.assign(val.bind(instance.proxy), val)
: val
return isFunction(val) ? extend(val.bind(instance.proxy), val) : val
}
} else {
return globalProperties[key]
Expand Down

0 comments on commit 87f2ce6

Please sign in to comment.