You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
body: `Lightning struck ${response[0].relativeTo.distanceMI} miles (${response[0].relativeTo.distanceKM} km) ${response[0].relativeTo.bearingENG} of this Location in ${city}.`,
document.getElementById('alerts').innerHTML=`<div style="background-color: #${response[0].details.color};">Alert: ${response[0].details.name} in effect for ${response[0].place.name}${response[0].place.state}.<a href="alertdetail.html?city=${city}">Click Here for more information on alerts</a></div>`
335
-
if(response[0].details.emergency===true){
336
-
document.getElementById("alerts").innerHTML=`<div style="background-color: #${response[0].details.color};">Alert: ${response[0].details.name} (EMERGENCY) in effect for ${response[0].place.name}${response[0].place.state}.<a href="alertdetail.html?city=${city}">Click Here for more information on alerts</a></div>`
337
-
}
338
-
if(response[1].details.name!=="undefined"){
339
-
alerts.innerHTML=`<div style="background-color: #${response[0].details.color};">Alert: ${response[0].details.name} in effect for ${response[0].place.name}${response[0].place.state}.<a href="alertdetail.html?city=${city}">Click Here for more information on alerts</a></div><div style="background-color: #${response[1].details.color};">Alert: ${response[1].details.name} in effect for ${response[0].place.name}${response[0].place.state}.</div>`
340
-
}else{
341
-
alerts.innerHTML=`<div style="background-color: #${response[0].details.color};">Alert: ${response[0].details.name} in effect for ${response[0].place.name}${response[0].place.state}.<a href="alertdetail.html?city=${city}">Click Here for more information on alerts</a></div>`
336
+
337
+
alerts.innerHTML="";
338
+
339
+
if(response?.length>0){
340
+
return;
341
+
}
342
+
343
+
constdetails=response[0].details;
344
+
constplace=response[0].place;
345
+
346
+
if(details?.name){
347
+
alerts.innerHTML=`<div style="background-color: #${details.color};">Alert: ${details.name} in effect for ${place.name}${place.state}.<a href="alertdetail.html?city=${city}">Click Here for more information on alerts</a></div>`
0 commit comments