chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a366aef
)
script: Fix a (silent) JS error
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 31 Mar 2021 17:26:08 +0000
(18:26 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 1 Apr 2021 10:38:14 +0000
(11:38 +0100)
When the api queue is empty this would spew a harmless error into the
log.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index f0e33e1ed3fc411c3f0da6163e67ce14daecba4b..46fc96d8ab2074e384313444913bd5edc3564fd8 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-207,7
+207,7
@@
function api_check() {
if (p == null) break;
p.queued_moves--;
if (p.queued_moves == 0) break;
- } while
(1
);
+ } while
(api_queue.length
);
api_posting = true;
xhr_post_then('/_/api/'+meth, JSON.stringify(data), api_posted);
}