From 12a270f9a1b61e6ae942de7532b16b1548206bd9 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 27 Jan 2022 20:23:59 -0800 Subject: [PATCH] benchmark: replace hasOwnProperty() with Object.hasOwn() --- benchmark/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/common.js b/benchmark/common.js index dbe69e31ad58de..88cb8a560f40e1 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -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