File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ class Table {
259
259
// try the Object
260
260
if ( typeof column === 'string' ) {
261
261
for ( let i = 0 ; i < this . rows . length ; i ++ ) {
262
- if ( this . rows [ i ] . obj [ column ] === value ) {
262
+ if ( this . rows [ i ] . obj [ this . columns . indexOf ( column ) ] === value ) {
263
263
return this . rows [ i ] ;
264
264
}
265
265
}
@@ -324,7 +324,7 @@ class Table {
324
324
const ret = [ ] ;
325
325
if ( typeof column === 'string' ) {
326
326
for ( let i = 0 ; i < this . rows . length ; i ++ ) {
327
- if ( this . rows [ i ] . obj [ column ] === value ) {
327
+ if ( this . rows [ i ] . obj [ this . columns . indexOf ( column ) ] === value ) {
328
328
ret . push ( this . rows [ i ] ) ;
329
329
}
330
330
}
@@ -387,7 +387,7 @@ class Table {
387
387
}
388
388
} else {
389
389
for ( let i = 0 ; i < this . rows . length ; i ++ ) {
390
- if ( this . rows [ i ] . obj [ column ] . match ( regexp ) ) {
390
+ if ( this . rows [ i ] . obj [ this . columns . indexOf ( column ) ] . match ( regexp ) ) {
391
391
return this . rows [ i ] ;
392
392
}
393
393
}
@@ -454,7 +454,7 @@ class Table {
454
454
}
455
455
} else {
456
456
for ( let i = 0 ; i < this . rows . length ; i ++ ) {
457
- if ( this . rows [ i ] . obj [ column ] . match ( regexp ) ) {
457
+ if ( this . rows [ i ] . obj [ this . columns . indexOf ( column ) ] . match ( regexp ) ) {
458
458
ret . push ( this . rows [ i ] ) ;
459
459
}
460
460
}
You can’t perform that action at this time.
0 commit comments