Skip to content

Commit

Permalink
use in operator instead of hasOwnProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
jirimoravcik committed Jan 15, 2025
1 parent 63a3763 commit 4f9ad4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/normalize_url_port.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const normalizeUrlPort = (url: URL): number => {
return Number(url.port);
}

if (Object.prototype.hasOwnProperty.call(mapping, url.protocol)) {
if (url.protocol in mapping) {
return mapping[url.protocol as keyof typeof mapping];
}

Expand Down

0 comments on commit 4f9ad4d

Please sign in to comment.