Skip to content

Commit

Permalink
benchmark: use Object.hasOwn() instead of hasOwnProperty()
Browse files Browse the repository at this point in the history
PR-URL: #41769
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
Trott authored and danielleadams committed Mar 14, 2022
1 parent 211a3c4 commit 2c566a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/http/check_invalid_header_char.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const bench = common.createBenchmark(main, {

function main({ n, input }) {
let inputs = [input];
if (groupedInputs.hasOwnProperty(input)) {
if (Object.hasOwn(groupedInputs, input)) {
inputs = groupedInputs[input];
}

Expand Down

0 comments on commit 2c566a9

Please sign in to comment.