Skip to content

Commit

Permalink
refactor(lib/swagger-initializer): replace var statements (#181)
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <[email protected]>
  • Loading branch information
Fdawgs authored Oct 25, 2024
1 parent bcb3f47 commit 170053f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/swagger-initializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ function swaggerInitializer (opts) {
});
}
function resolveUrl(url) {
var currentHref = window.location.href;
let currentHref = window.location.href;
currentHref = currentHref.split('#', 1)[0];
currentHref = currentHref.endsWith('/') ? currentHref : currentHref + '/';
var anchor = document.createElement('a');
const anchor = document.createElement('a');
anchor.href = currentHref + url;
return anchor.href
}
Expand Down

0 comments on commit 170053f

Please sign in to comment.