aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-24 18:23:39 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-24 18:23:39 +0200
commitf7ab8065e88e0f8454b3d1426e149f104245fb3e (patch)
tree7ac743d2a7f8176c42d53b3277704da0b160eaf4
parentButton onclick now actually sends object. (diff)
downloadcalp-f7ab8065e88e0f8454b3d1426e149f104245fb3e.tar.gz
calp-f7ab8065e88e0f8454b3d1426e149f104245fb3e.tar.xz
Abandon UI changes if event create fails.
-rw-r--r--static/script.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js
index 6cd6668d..ef71b6b8 100644
--- a/static/script.js
+++ b/static/script.js
@@ -318,6 +318,7 @@ async function create_event (event) {
console.log(response);
if (response.status < 200 || response.status >= 300) {
alert(`HTTP error ${response.status}\n${response.statusText}`)
+ return;
}
let body = await response.text();