Skip to content

Commit ca1cd42

Browse files
Trottruyadorno
authored andcommitted
benchmark: replace hasOwnProperty() with Object.hasOwn()
PR-URL: #41724 Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent f5adf54 commit ca1cd42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benchmark/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Benchmark {
3838
this.config = this.queue[0];
3939

4040
process.nextTick(() => {
41-
if (process.env.hasOwnProperty('NODE_RUN_BENCHMARK_FN')) {
41+
if (Object.hasOwn(process.env, 'NODE_RUN_BENCHMARK_FN')) {
4242
fn(this.config);
4343
} else {
4444
// _run will use fork() to create a new process for each configuration

0 commit comments

Comments
 (0)