Skip to content

Commit

Permalink
#675 | Fix | Cannot read properties of undefined (reading 'defaultPor…
Browse files Browse the repository at this point in the history
…t') when used with nock (#687)

* Added the null check for default port

* reverted open id verison change

* new line

---------

Co-authored-by: sangeet-joy_xero <[email protected]>
  • Loading branch information
sangeet-joy-tw and sangeet-joy_xero authored Jun 20, 2024
1 parent dc971bc commit 4ec4785
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
64 changes: 32 additions & 32 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion src/model/ApiError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ApiError {
this.request = {
url: {
protocol: axiosError.request.protocol,
port: axiosError.request.agent.defaultPort,
port: axiosError.request.agent?.defaultPort || axiosError.request.socket?.localPort,
host: axiosError.request.host,
path: axiosError.request.path,
},
Expand Down

0 comments on commit 4ec4785

Please sign in to comment.