Skip to content

Commit 75511cc

Browse files
authored
fixing get() and getNum()
1 parent 2690d7a commit 75511cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io/p5.TableRow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class TableRow {
194194
*/
195195
get(column) {
196196
if (typeof column === 'string') {
197-
return this.obj[column];
197+
return this.obj[this.table.columns.indexOf(column)];
198198
} else {
199199
return this.arr[column];
200200
}
@@ -241,7 +241,7 @@ class TableRow {
241241
getNum(column) {
242242
let ret;
243243
if (typeof column === 'string') {
244-
ret = parseFloat(this.obj[column]);
244+
ret = parseFloat(this.obj[this.table.columns.indexOf(column)]);
245245
} else {
246246
ret = parseFloat(this.arr[column]);
247247
}

0 commit comments

Comments
 (0)