Skip to content

Commit 1f7bae7

Browse files
committed
Use an undefined check rather than hasOwnProperty.
1 parent 1220ae5 commit 1f7bae7

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

lib/api-client.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api-client.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ export const getApiClient = function (
3232
octokit.hook.after("request", (response: OctokitResponse<any>, _) => {
3333
if (
3434
!hasBeenWarnedAboutVersion &&
35-
Object.prototype.hasOwnProperty.call(
36-
response.headers,
37-
GITHUB_ENTERPRISE_VERSION_HEADER
38-
)
35+
response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] !== undefined
3936
) {
4037
const installedVersion = response.headers[
4138
GITHUB_ENTERPRISE_VERSION_HEADER

0 commit comments

Comments
 (0)