From c66d043ac6318da99c2aa6f4a6a11db3a33f1c99 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Mon, 25 Feb 2019 16:11:54 -0800 Subject: Fix console.table display of Map and move tests to unit test (#1839) --- js/console.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/console.ts') diff --git a/js/console.ts b/js/console.ts index 0fa4ea6c7..93a9c72f0 100644 --- a/js/console.ts +++ b/js/console.ts @@ -581,8 +581,8 @@ export class Console { table = (data: unknown, properties?: string[]): void => { if (properties !== undefined && !Array.isArray(properties)) { throw new Error( - "The 'properties' argument must be of type Array\ - . Received type string" + "The 'properties' argument must be of type Array. " + + "Received type string" ); } @@ -615,7 +615,7 @@ export class Console { let idx = 0; resultData = {}; - data.forEach((k: unknown, v: unknown) => { + data.forEach((v: unknown, k: unknown) => { resultData[idx] = { Key: k, Values: v }; idx++; }); -- cgit v1.2.3