mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
js: Prevent scheduling a non-immediate reload while one is happening.
Prevent a non-immediate reload from being scheduled while an immediate reload is already in progress. This is highly unlikely in practice, but is a reasonable safeguard.
This commit is contained in:
committed by
Tim Abbott
parent
95ad507658
commit
8c1c02d164
@@ -241,7 +241,7 @@ export function initiate({
|
||||
do_reload_app(send_after_reload, save_pointer, save_narrow, save_compose, message_html);
|
||||
}
|
||||
|
||||
if (reload_state.is_pending()) {
|
||||
if (reload_state.is_pending() || reload_state.is_in_progress()) {
|
||||
return;
|
||||
}
|
||||
reload_state.set_state_to_pending();
|
||||
|
||||
Reference in New Issue
Block a user