]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: avoid including full error type strings in prod
authorEvan You <yyx990803@gmail.com>
Sat, 31 Aug 2019 20:43:02 +0000 (16:43 -0400)
committerEvan You <yyx990803@gmail.com>
Sat, 31 Aug 2019 20:43:02 +0000 (16:43 -0400)
packages/runtime-core/src/errorHandling.ts

index 0a01314575b71576a622be82aa487b7515f1ad7b..7cad6a352574c59f3ed7619b63b29f4dc2452917 100644 (file)
@@ -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