From 1e3837485873e576f3e0b409cf06f084bed95656 Mon Sep 17 00:00:00 2001 From: fnuesse Date: Wed, 21 Nov 2018 00:23:53 +0100 Subject: [PATCH] Added undefined underscore as parameter to fix travis Signed-off-by: fnuesse --- tests/unit/js/mocks/OC.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/unit/js/mocks/OC.js b/tests/unit/js/mocks/OC.js index f88dc9e7..16a0bcfe 100644 --- a/tests/unit/js/mocks/OC.js +++ b/tests/unit/js/mocks/OC.js @@ -730,9 +730,11 @@ var OC={ * After 7sec the first notification is gone, then we can show another one * if necessary. */ - _ajaxConnectionLostHandler: _.throttle(function() { - OC.Notification.showTemporary(t('core', 'Connection to server lost')); - }, 7 * 1000, {trailing: false}), + _ajaxConnectionLostHandler: function(underscore){ + underscore.throttle(function() { + OC.Notification.showTemporary(t('core', 'Connection to server lost')); + }, 7 * 1000, {trailing: false}); + }, /** * Process ajax error, redirects to main page @@ -761,7 +763,7 @@ var OC={ // Connection lost (e.g. WiFi disconnected or server is down) setTimeout(function() { if (!self._userIsNavigatingAway && !self._reloadCalled) { - self._ajaxConnectionLostHandler(); + self._ajaxConnectionLostHandler(_); } }, 100); }