From: Evan You Date: Mon, 7 Oct 2019 14:57:35 +0000 (-0400) Subject: refactor(runtime-dom/events): use more explicit variable name to avoid shadowing X-Git-Tag: v3.0.0-alpha.0~568 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=caaeaff2fdfa29ccfad2a562bddb21d9c4f03b74;p=thirdparty%2Fvuejs%2Fcore.git refactor(runtime-dom/events): use more explicit variable name to avoid shadowing --- diff --git a/packages/runtime-dom/src/modules/events.ts b/packages/runtime-dom/src/modules/events.ts index 0fb180c816..7674f69b52 100644 --- a/packages/runtime-dom/src/modules/events.ts +++ b/packages/runtime-dom/src/modules/events.ts @@ -62,7 +62,10 @@ export function patchEvent( } } -function createInvoker(value: any, instance: ComponentInternalInstance | null) { +function createInvoker( + initialValue: any, + instance: ComponentInternalInstance | null +) { const invoker = ((e: Event) => { // async edge case #6566: inner click event triggers patch, event handler // attached to outer element during patch, and triggered again. This @@ -92,8 +95,8 @@ function createInvoker(value: any, instance: ComponentInternalInstance | null) { } } }) as any - invoker.value = value - value.invoker = invoker + invoker.value = initialValue + initialValue.invoker = invoker invoker.lastUpdated = getNow() return invoker }