From 170053f259f9571c53083556d7234b47f9824ff5 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 25 Oct 2024 14:52:17 +0100 Subject: [PATCH] refactor(lib/swagger-initializer): replace `var` statements (#181) Signed-off-by: Frazer Smith --- lib/swagger-initializer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/swagger-initializer.js b/lib/swagger-initializer.js index ba36a5c..4e1fc4a 100644 --- a/lib/swagger-initializer.js +++ b/lib/swagger-initializer.js @@ -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 }