Fix rare threadlist race condition properly.
This commit is contained in:
parent
8518c70a66
commit
770b5cddab
1 changed files with 4 additions and 2 deletions
|
|
@ -163,7 +163,9 @@ when defined(js):
|
||||||
if state.status != Http200:
|
if state.status != Http200:
|
||||||
return renderError("Couldn't retrieve threads.")
|
return renderError("Couldn't retrieve threads.")
|
||||||
|
|
||||||
if state.list.isNone and (not state.loading):
|
if state.list.isNone:
|
||||||
|
if not state.loading:
|
||||||
|
state.loading = true
|
||||||
ajaxGet(makeUri("threads.json"), @[], onThreadList)
|
ajaxGet(makeUri("threads.json"), @[], onThreadList)
|
||||||
|
|
||||||
return buildHtml(tdiv(class="loading loading-lg"))
|
return buildHtml(tdiv(class="loading loading-lg"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue