From 64298100b6c3c8cef4655c742da86b81d05383cb Mon Sep 17 00:00:00 2001 From: Simon Holloway Date: Wed, 10 Jan 2024 18:55:05 +0000 Subject: [PATCH] refactor(csv): prepare for `noUncheckedIndexedAccess` --- csv/_io.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csv/_io.ts b/csv/_io.ts index e9785a2d4f86..e8340d0a0944 100644 --- a/csv/_io.ts +++ b/csv/_io.ts @@ -262,8 +262,8 @@ export function convertRowToObject( ); } const out: Record = {}; - for (let i = 0; i < row.length; i++) { - out[headers[i]] = row[i]; + for (const [index, header] of headers.entries()) { + out[header] = row[index]; } return out; }