From: Ian Jackson Date: Wed, 21 Jul 2021 20:06:48 +0000 (+0100) Subject: js test: call test_update_hook on api queue empty X-Git-Tag: otter-0.7.2~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=4dd1189312602baf8391ae7c56d8d219ae870807;p=otter.git js test: call test_update_hook on api queue empty Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 65c7511b..4c258775 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -224,7 +224,7 @@ function api_delay(meth: string, data: Object) { } function api_check() { if (api_posting) { return; } - if (!api_queue.length) { return; } + if (!api_queue.length) { test_update_hook(); return; } do { var [meth, data] = api_queue.shift()!; if (meth != 'm') break;