Use an undefined check rather than hasOwnProperty.

This commit is contained in:
Chris Gavin 2020-11-02 08:47:11 +00:00
parent 1220ae5bfd
commit 1f7bae7ab8
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
3 changed files with 3 additions and 6 deletions

View file

@ -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