mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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 ``` PR-URL: https://github.com/nodejs/node/pull/59170 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
This commit is contained in:
parent
91a131e81a
commit
92095048d1
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ function main(conf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let i;
|
let i;
|
||||||
let deadCodeElimination;
|
let deadCodeElimination = true;
|
||||||
|
|
||||||
bench.start();
|
bench.start();
|
||||||
for (i = 0; i < conf.n; i += 1)
|
for (i = 0; i < conf.n; i += 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue