Skip to content

Commit

Permalink
Ensure _id and _index are defined in EsHitRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
davismcphee committed Jun 6, 2024
1 parent 113f66f commit 6607524
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export function fetchEsql(
esqlQueryColumns = table?.columns ?? undefined;
esqlHeaderWarning = table.warning ?? undefined;
finalData = rows.map((row, idx) => {
row._id = row._id ?? '';
row._index = row._index ?? '';

const record: DataTableRecord = {
id: String(idx),
raw: row as EsHitRecord,
Expand Down

0 comments on commit 6607524

Please sign in to comment.