Fix handling new spots by SSE when there weren't any others #3

This commit is contained in:
Ian Renton
2025-12-23 21:58:25 +00:00
parent ae1caaa40f
commit 926cf5caaf

View File

@@ -51,7 +51,9 @@ function restartSSEConnection() {
} }
// If we had zero spots before (i.e. one now), the table will have a "No spots" row that we need to remove now // If we had zero spots before (i.e. one now), the table will have a "No spots" row that we need to remove now
// that we have one. // that we have one.
if (spots.length == 1) {
$("#table tbody tr").last().remove(); $("#table tbody tr").last().remove();
}
// Add the new spot to table // Add the new spot to table
addSpotToTopOfTable(newSpot, true); addSpotToTopOfTable(newSpot, true);