Fix: join room by link to load css

This commit is contained in:
Grail Finder
2025-09-11 19:29:03 +03:00
parent 1664c26c0a
commit 33bda503fc
2 changed files with 10 additions and 1 deletions

View File

@@ -88,6 +88,11 @@ func HandleExit(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/", 302)
return
}
if fi.Room == nil {
log.Error("failed to fetch room")
http.Redirect(w, r, "/", 302)
return
}
if fi.Room.IsRunning {
abortWithError(w, "cannot leave when game is running")
return