]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: remove line numbers from default errors
authorEvan You <yyx990803@gmail.com>
Fri, 13 Dec 2019 22:28:12 +0000 (17:28 -0500)
committerEvan You <yyx990803@gmail.com>
Fri, 13 Dec 2019 22:28:12 +0000 (17:28 -0500)
packages/compiler-core/src/errors.ts

index 3a9e3469ee6c0e3c5132ab08763faf5e3fd6c7f6..b507a416ff95e2801309062bbac3eb5a4b9601ae 100644 (file)
@@ -19,8 +19,7 @@ export function createCompilerError<T extends number>(
   messages?: { [code: number]: string }
 ): T extends ErrorCodes ? CoreCompilerError : CompilerError {
   const msg = __DEV__ || !__BROWSER__ ? (messages || errorMessages)[code] : code
-  const locInfo = loc ? ` (${loc.start.line}:${loc.start.column})` : ``
-  const error = new SyntaxError(msg + locInfo) as CompilerError
+  const error = new SyntaxError(String(msg)) as CompilerError
   error.code = code
   error.loc = loc
   return error as any