summaryrefslogtreecommitdiff
path: root/js/console.ts
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2019-02-25 16:11:54 -0800
committerRyan Dahl <ry@tinyclouds.org>2019-02-25 19:11:54 -0500
commitc66d043ac6318da99c2aa6f4a6a11db3a33f1c99 (patch)
tree868f0e173a9bd0420d8033f4567c177be60fc041 /js/console.ts
parentce5d5c51331b49f2dd381737a8340433746276af (diff)
Fix console.table display of Map and move tests to unit test (#1839)
Diffstat (limited to 'js/console.ts')
-rw-r--r--js/console.ts6
1 files changed, 3 insertions, 3 deletions
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++;
});