diff --git a/src/utils/CompileError.ts b/src/utils/CompileError.ts index 1af9b39c2f..16dabc3c13 100644 --- a/src/utils/CompileError.ts +++ b/src/utils/CompileError.ts @@ -24,7 +24,7 @@ export default class CompileError extends Error { this.frame = getCodeFrame(template, line, column); } - toString() { + public toString = () => { return `${this.message} (${this.loc.line}:${this.loc.column})\n${this .frame}`; }