Skip to content

Commit

Permalink
fix: ensure custom properties are copied onto bound function
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusBorg committed Nov 25, 2021
1 parent 0fdaabc commit 63f9b87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentPublicInstance.ts
Expand Up @@ -356,8 +356,8 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
return desc.get.call(instance.proxy)
} else {
const val = globalProperties[key]
return isFunction(val) && Object.keys(val).length === 0
? val.bind(instance.proxy)
return isFunction(val)
? Object.assign(val.bind(instance.proxy), val)
: val
}
} else {
Expand Down

0 comments on commit 63f9b87

Please sign in to comment.