Skip to content

Commit 553b1aa

Browse files
authored
feat(dialect-wasqlite-worker): Don't initialize the result array with the column length (#23)
The result was initialized as a `new Array` with a length equal to the number of columns returned by the query.
1 parent f1a9bf4 commit 553b1aa

File tree

1 file changed

+1
-2
lines changed
  • packages/dialect-wasqlite-worker/src/worker

1 file changed

+1
-2
lines changed

packages/dialect-wasqlite-worker/src/worker/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ async function queryData(
5959
}
6060

6161
const mapRow = createRowMapper(core.sqlite, stmt)
62-
// eslint-disable-next-line unicorn/no-new-array
63-
const result = new Array(size)
62+
const result = []
6463
let idx = 0
6564
while (await core.sqlite.step(stmt) === SQLITE_ROW) {
6665
result[idx++] = mapRow(core.sqlite.row(stmt))

0 commit comments

Comments
 (0)