From 1e5e091cb074896c7550b1b6f802582f12629048 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Mon, 11 Feb 2019 15:06:22 -0800 Subject: [PATCH] Fix REPL formatting (#1744) --- js/repl.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/js/repl.ts b/js/repl.ts index e452eb1914..00b88d8bbe 100644 --- a/js/repl.ts +++ b/js/repl.ts @@ -103,8 +103,7 @@ export async function replLoop(): Promise { if (err.message !== "Interrupted") { // e.g. this happens when we have deno.close(3). // We want to display the problem. - const formattedError = formatError( - libdeno.errorToJSON(err)); + const formattedError = formatError(libdeno.errorToJSON(err)); console.error(formattedError); } // Quit REPL anyways. @@ -126,8 +125,7 @@ export async function replLoop(): Promise { } else { // e.g. this happens when we have deno.close(3). // We want to display the problem. - const formattedError = formatError( - libdeno.errorToJSON(err)); + const formattedError = formatError(libdeno.errorToJSON(err)); console.error(formattedError); quitRepl(1); } @@ -143,8 +141,7 @@ function evaluate(code: string): boolean { const [result, errInfo] = libdeno.evalContext(code); if (!errInfo) { console.log(result); - } else if (errInfo.isCompileError && - isRecoverableError(errInfo.thrown)) { + } else if (errInfo.isCompileError && isRecoverableError(errInfo.thrown)) { // Recoverable compiler error return false; // don't consume code. } else {