Skip to content

Commit a3b20ba

Browse files
committed
example-multipleServers-pretty now shows an error when no servers are available
1 parent 53fb62e commit a3b20ba

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

example-multipleServers-pretty.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@
4848
}
4949
function selectServer(){ //called after loading server list
5050
s.selectServer(function(server){ //run server selection. When the server has been selected, display it in the UI
51-
I("startStopBtn").style.display=""; //show start/stop button again
52-
I("serverId").textContent=server.name; //show name of test server
51+
if(server==null){
52+
I("serverId").textContent="No servers available";
53+
}else{
54+
I("startStopBtn").style.display=""; //show start/stop button again
55+
I("serverId").textContent=server.name; //show name of test server
56+
}
5357
});
5458
}
5559
function loadServers(){ //called when the page is fully loaded

0 commit comments

Comments
 (0)