diff --git a/html/script.js b/html/script.js
index a8eee42..b248518 100644
--- a/html/script.js
+++ b/html/script.js
@@ -1745,9 +1745,8 @@ jQuery('#selected_altitude_geom1')
jQuery('#imageConfigLink').text(imageConfigText)
jQuery('#imageConfigHeader').show();
}
- if (aiscatcher_server != "") {
- let host = window.location.hostname;
- aiscatcher_server = aiscatcher_server.replace('HOSTNAME', host);
+ if (aiscatcher_server) {
+ aiscatcher_server = aiscatcher_server.replace('HOSTNAME', window.location.hostname);
}
if (hideButtons) {