From 4db8c8f61c3dddfe4bd0dc0349cedd5334cd2f1c Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Thu, 14 Oct 2021 00:51:28 +1100 Subject: [PATCH] thrimbletrimmer: undo bad refactor --- thrimbletrimmer/scripts/IO.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thrimbletrimmer/scripts/IO.js b/thrimbletrimmer/scripts/IO.js index d780c40..98a5db8 100644 --- a/thrimbletrimmer/scripts/IO.js +++ b/thrimbletrimmer/scripts/IO.js @@ -342,9 +342,8 @@ function thrimbletrimmerSubmit(state, override_changes = false) { "Content-Type": "application/json", }, body: JSON.stringify(wubData), - }) - .then(response => response.text()) - .then(text => { + }).then(response => + response.text().then(text => { if (!response.ok) { if (response.status == 409) { dialogue = text + "\nClick Ok to submit anyway; Click Cancel to return to editing"; @@ -362,7 +361,8 @@ function thrimbletrimmerSubmit(state, override_changes = false) { alert("Draft saved"); } document.getElementById("SubmitButton").disabled = false; - }); + }) + ); } function thrimbletrimmerDownload(isEditor) {