RowsToFields: Fix issue with field names that are numbers (#40580)
* RowsToFields: Fix issue with field names that are numbers * Only add the index accessor if field name does not conflict with it * fix lint Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
7e59b92c8c
commit
25813db334
@@ -32,10 +32,12 @@ export class DataFrameView<T = any> extends FunctionalVector<T> {
|
||||
});
|
||||
}
|
||||
|
||||
Object.defineProperty(obj, i, {
|
||||
enumerable: false, // Don't enumerate array index
|
||||
get: getter,
|
||||
});
|
||||
if (!(obj as any).hasOwnProperty(i.toString())) {
|
||||
Object.defineProperty(obj, i, {
|
||||
enumerable: false, // Don't enumerate array index
|
||||
get: getter,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.obj = obj;
|
||||
|
||||
Reference in New Issue
Block a user