Skip to content

Commit

Permalink
Use an undefined check rather than hasOwnProperty.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gavin committed Nov 2, 2020
1 parent 1220ae5 commit 1f7bae7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/api-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/api-client.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ export const getApiClient = function (
octokit.hook.after("request", (response: OctokitResponse<any>, _) => {
if (
!hasBeenWarnedAboutVersion &&
Object.prototype.hasOwnProperty.call(
response.headers,
GITHUB_ENTERPRISE_VERSION_HEADER
)
response.headers[GITHUB_ENTERPRISE_VERSION_HEADER] !== undefined
) {
const installedVersion = response.headers[
GITHUB_ENTERPRISE_VERSION_HEADER
Expand Down

0 comments on commit 1f7bae7

Please sign in to comment.