Skip to content

Commit b5ab52a

Browse files
committed
Fix p5.Table.getColumn does not work with named columns
1 parent 762f58b commit b5ab52a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/p5.Table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ class Table {
500500
const ret = [];
501501
if (typeof value === 'string') {
502502
for (let i = 0; i < this.rows.length; i++) {
503-
ret.push(this.rows[i].obj[value]);
503+
ret.push(this.rows[i].obj[this.columns.indexOf(value)]);
504504
}
505505
} else {
506506
for (let j = 0; j < this.rows.length; j++) {

0 commit comments

Comments
 (0)