Skip to content

Commit

Permalink
Fix when url.port is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 authored Sep 20, 2023
1 parent 180aa9e commit 7fb62c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions out/notebooks/splunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getClient() {

let url = new URL(restUrl);
const scheme = url.protocol.replace(':', '');
const port = url.port || scheme === 'https' ? 443 : 80;
const port = url.port || (scheme === 'https' ? '443' : '80');
const host = url.hostname;

let service = new splunk.Service({
Expand Down Expand Up @@ -337,4 +337,4 @@ export function wait(ms = 1000) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
}
}

0 comments on commit 7fb62c5

Please sign in to comment.