eslint: Enable prefer-arrow-callback.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-01 16:45:54 -07:00
committed by Tim Abbott
parent 960174408f
commit a79322bc94
160 changed files with 873 additions and 1012 deletions

View File

@@ -199,11 +199,11 @@ function do_reload_app(send_after_reload, save_pointer, save_narrow, save_compos
// broken state and cause lots of confusing tracebacks. So, we
// set ourselves to try reloading a bit later, both periodically
// and when the user focuses the window.
$(window).on('focus', function () {
$(window).on('focus', () => {
blueslip.log("Retrying on-focus page reload");
window.location.reload(true);
});
setInterval(function () {
setInterval(() => {
blueslip.log("Retrying page reload due to 30s timer");
window.location.reload(true);
}, 30000);
@@ -322,7 +322,7 @@ exports.initiate = function (options) {
}
};
window.addEventListener('beforeunload', function () {
window.addEventListener('beforeunload', () => {
// When navigating away from the page do not try to reload.
// The polling get_events call will fail after we delete the event queue.
// When that happens we reload the page to correct the problem. If this