Skip to content

Commit

Permalink
Replace newline in results
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Jan 23, 2020
1 parent 56a74a9 commit 0554d13
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export function formatJson(json: unknown): string {
}

export function formatResponse(response: Response): string {
if (response.result) {
return response.result;
if (typeof response.result === 'string') {
return response.result.replace(/\\n/g, '\n');
} else if (response.error) {
return formatExecutionError(response.error);
}
Expand Down

0 comments on commit 0554d13

Please sign in to comment.