Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca1cd42

Browse filesBrowse files
Trottruyadorno
authored andcommitted
benchmark: replace hasOwnProperty() with Object.hasOwn()
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>
1 parent f5adf54 commit ca1cd42
Copy full SHA for ca1cd42

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎benchmark/common.js‎

Copy file name to clipboardExpand all lines: benchmark/common.js
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.