From: HcySunYang Date: Thu, 25 Feb 2021 14:04:28 +0000 (+0800) Subject: fix(runtime-core): properties in methods should be writable and enumerable in DEV... X-Git-Tag: v3.0.7~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3568bae276889cee60f4e84321a287125014e86;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): properties in methods should be writable and enumerable in DEV (#3301) fix #3300 --- diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index c836f12549..70948d41cf 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -610,7 +610,8 @@ export function applyOptions( Object.defineProperty(ctx, key, { value: methodHandler.bind(publicThis), configurable: true, - enumerable: false + enumerable: true, + writable: true }) } else { ctx[key] = methodHandler.bind(publicThis)