Use an undefined check rather than hasOwnProperty.
This commit is contained in:
parent
1220ae5bfd
commit
1f7bae7ab8
3 changed files with 3 additions and 6 deletions
2
lib/api-client.js
generated
2
lib/api-client.js
generated
|
|
@ -33,7 +33,7 @@ exports.getApiClient = function (githubAuth, githubUrl, mode, allowLocalRun = fa
|
|||
const customOctokit = githubUtils.GitHub.plugin(retry.retry, (octokit, _) => {
|
||||
octokit.hook.after("request", (response, _) => {
|
||||
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];
|
||||
const disallowedAPIVersionReason = apiVersionInRange(installedVersion, apiCompatibility.minimumVersion, apiCompatibility.maximumVersion);
|
||||
const logger = mode === "actions"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue