From ae33b8428916d849ab697034ac7f07d58f645da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Fern=C3=A1ndez=20Capel?= Date: Mon, 5 Feb 2018 13:48:52 +0000 Subject: [PATCH] Ignore heartbeat event handler params They are not used for anything and the cause an error when the handler is called from a scroll event. --- services/web/public/coffee/main/event.coffee | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/web/public/coffee/main/event.coffee b/services/web/public/coffee/main/event.coffee index e03a0a8afb..3ff8fc0aa4 100644 --- a/services/web/public/coffee/main/event.coffee +++ b/services/web/public/coffee/main/event.coffee @@ -37,11 +37,10 @@ define [ localStorage CACHE_KEY, curCache - _sendEditingSessionHeartbeat = (segmentation) -> + _sendEditingSessionHeartbeat = () -> $http({ url: "/editingSession/#{window.project_id}", method: "PUT", - data: segmentation, headers: { "X-CSRF-Token": window.csrfToken } @@ -52,10 +51,10 @@ define [ ga('send', 'event', category, action, label, value) - editingSessionHeartbeat: (segmentation = {}) -> + editingSessionHeartbeat: () -> return unless nextHeartbeat <= new Date() - _sendEditingSessionHeartbeat(segmentation) + _sendEditingSessionHeartbeat() heartbeatsSent++