From: Evan You Date: Sat, 31 Aug 2019 20:43:02 +0000 (-0400) Subject: wip: avoid including full error type strings in prod X-Git-Tag: v3.0.0-alpha.0~856 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c6ecf414493e6e931ad0f5e0e5c9b848ea3d7bf;p=thirdparty%2Fvuejs%2Fcore.git wip: avoid including full error type strings in prod --- diff --git a/packages/runtime-core/src/errorHandling.ts b/packages/runtime-core/src/errorHandling.ts index 0a01314575..7cad6a3525 100644 --- a/packages/runtime-core/src/errorHandling.ts +++ b/packages/runtime-core/src/errorHandling.ts @@ -88,7 +88,8 @@ export function handleError( errorCapturedHooks[i]( err, instance && instance.renderProxy, - ErrorTypeStrings[type] + // in production the hook receives only the error code + __DEV__ ? ErrorTypeStrings[type] : type ) ) { return