From 79820a0f05434245cadef56d6dc125a4d479501e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 23 Oct 2018 17:52:19 +0200 Subject: [PATCH] Add function as method of to be stric mode compilant --- lib/cartodb/models/resource-locator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cartodb/models/resource-locator.js b/lib/cartodb/models/resource-locator.js index efdabce7..6a7b8049 100644 --- a/lib/cartodb/models/resource-locator.js +++ b/lib/cartodb/models/resource-locator.js @@ -75,7 +75,7 @@ ResourceLocator.prototype.getUrls = function(username, resourcePath) { } }; -function urlForTemplate(tpl, username, cdnDomain, resource, templated) { +ResourceLocator.prototype.urlForTemplate = function (tpl, username, cdnDomain, resource, templated) { cdnDomain = cdnDomain || {}; if (templated) { return { @@ -109,10 +109,10 @@ ResourceLocator.prototype.getUrlsFromTemplate = function(username, resource, tem var urls = {}; var cdnDomain = getCdnDomain(this.environment.serverMetadata, resource) || {}; if (this.resourcesUrlTemplates.http) { - urls.http = urlForTemplate(this.resourcesUrlTemplates.http, username, cdnDomain.http, resource, templated); + urls.http = this.urlForTemplate(this.resourcesUrlTemplates.http, username, cdnDomain.http, resource, templated); } if (this.resourcesUrlTemplates.https) { - urls.https = urlForTemplate(this.resourcesUrlTemplates.https, username, cdnDomain.https, resource, templated); + urls.https = this.urlForTemplate(this.resourcesUrlTemplates.https, username, cdnDomain.https, resource, templated); } return urls;