Add function as method of to be stric mode compilant

This commit is contained in:
Daniel García Aubert 2018-10-23 17:52:19 +02:00
parent a0126f6a15
commit 79820a0f05

View File

@ -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;