Skip to content

Commit afdb248

Browse files
committed
benchmark: fix sqlite-is-transaction
The variable deadCodeElimination is declared but not initialized, making it undefined by default. When using the &&= operator with an undefined left operand, the result will always remain undefined regardless of how many iterations run. ```js let deadCodeElimination; deadCodeElimination &&= true deadCodeElimination // undefined ```
1 parent 2a7fb0a commit afdb248

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmark/sqlite/sqlite-is-transaction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function main(conf) {
1616
}
1717

1818
let i;
19-
let deadCodeElimination;
19+
let deadCodeElimination = true;
2020

2121
bench.start();
2222
for (i = 0; i < conf.n; i += 1)

0 commit comments

Comments
 (0)