apply prettier formatting

This commit is contained in:
Resi Respati
2018-08-01 11:49:15 +07:00
parent a0563bf15e
commit ebc46fb96e
2 changed files with 4 additions and 4 deletions

View File

@@ -3,5 +3,5 @@
"tabWidth": 2, "tabWidth": 2,
"printWidth": 120, "printWidth": 120,
"singleQuote": false, "singleQuote": false,
"trailingComma": "es5" "trailingComma": "none"
} }

View File

@@ -26,7 +26,7 @@ export class ErrorMapper {
* @returns {string} The source-mapped stack trace * @returns {string} The source-mapped stack trace
*/ */
public static sourceMappedStackTrace(error: Error | string): string { public static sourceMappedStackTrace(error: Error | string): string {
const stack: string = error instanceof Error ? error.stack as string : error; const stack: string = error instanceof Error ? (error.stack as string) : error;
if (this.cache.hasOwnProperty(stack)) { if (this.cache.hasOwnProperty(stack)) {
return this.cache[stack]; return this.cache[stack];
} }
@@ -35,7 +35,7 @@ export class ErrorMapper {
let match: RegExpExecArray | null; let match: RegExpExecArray | null;
let outStack = error.toString(); let outStack = error.toString();
while (match = re.exec(stack)) { while ((match = re.exec(stack))) {
if (match[2] === "main") { if (match[2] === "main") {
const pos = this.consumer.originalPositionFor({ const pos = this.consumer.originalPositionFor({
column: parseInt(match[4], 10), column: parseInt(match[4], 10),