Skip to content

Commit

Permalink
benchmark: replace hasOwnProperty() with Object.hasOwn()
Browse files Browse the repository at this point in the history
PR-URL: #41724
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
Trott authored and danielleadams committed Mar 14, 2022
1 parent a44a8ff commit b77e72a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/common.js
Expand Up @@ -38,7 +38,7 @@ class Benchmark {
this.config = this.queue[0];

process.nextTick(() => {
if (process.env.hasOwnProperty('NODE_RUN_BENCHMARK_FN')) {
if (Object.hasOwn(process.env, 'NODE_RUN_BENCHMARK_FN')) {
fn(this.config);
} else {
// _run will use fork() to create a new process for each configuration
Expand Down

0 comments on commit b77e72a

Please sign in to comment.