From 669707b26c05ab6ef88d35587cd5f0499d345ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 18 Jul 2017 11:56:54 +0200 Subject: [PATCH] Fix typo --- lib/cartodb/api/user_limits_api.js | 5 ++++- test/acceptance/user-timeout-limit.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cartodb/api/user_limits_api.js b/lib/cartodb/api/user_limits_api.js index 7f244e7d..7e004e31 100644 --- a/lib/cartodb/api/user_limits_api.js +++ b/lib/cartodb/api/user_limits_api.js @@ -81,10 +81,13 @@ UserLimitsApi.prototype.getTimeoutRenderLimit = function (username, apiKey, call }); }, function getUserTimeoutRenderLimits(err, authorized) { + var next = this; + if (err) { return next(err); } - self.metadataBackend.getUserTimeoutRenderLimits(username, authorized, this); + + self.metadataBackend.getUserTimeoutRenderLimits(username, authorized, next); }, function setTilerRenderLimit(err, timeoutRenderLimit) { if (err) { diff --git a/test/acceptance/user-timeout-limit.js b/test/acceptance/user-timeout-limit.js index 0c75dce2..c83db965 100644 --- a/test/acceptance/user-timeout-limit.js +++ b/test/acceptance/user-timeout-limit.js @@ -69,7 +69,7 @@ describe('user timeout limits', function () { var mapConfig = createMapConfig(TestClient.CARTOCSS.POINTS); var testClient = new TestClient(mapConfig, 1234); - testClient.getTile(4, 4, 4, {}, function (err, /* res, tile */) { + testClient.getTile(4, 4, 4, {}, function (err /*, res, tile */) { assert.ok(err, err); // TODO: check timeout tile testClient.drain(done);