Skip to content

Commit 63f9b87

Browse files
committed
fix: ensure custom properties are copied onto bound function
1 parent 0fdaabc commit 63f9b87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/runtime-core/src/componentPublicInstance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
356356
return desc.get.call(instance.proxy)
357357
} else {
358358
const val = globalProperties[key]
359-
return isFunction(val) && Object.keys(val).length === 0
360-
? val.bind(instance.proxy)
359+
return isFunction(val)
360+
? Object.assign(val.bind(instance.proxy), val)
361361
: val
362362
}
363363
} else {

0 commit comments

Comments
 (0)