@stemy/ngx-utils 11.2.7 → 11.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3225,10 +3225,12 @@
3225
3225
  return Promise.resolve(config);
3226
3226
  };
3227
3227
  ConfigService.prototype.prepareUrl = function (url, ending) {
3228
+ var _a;
3228
3229
  var project = !this.loadedConfig ? "" : this.loadedConfig.project;
3229
- url = (url === null || url === void 0 ? void 0 : url.startsWith("/")) ? this.loadedConfig.baseDomain + url.substr(1) : url || "";
3230
+ var needsProtocol = (_a = url === null || url === void 0 ? void 0 : url.startsWith("//")) !== null && _a !== void 0 ? _a : false;
3231
+ url = !needsProtocol && (url === null || url === void 0 ? void 0 : url.startsWith("/")) ? this.loadedConfig.baseDomain + url.substr(1) : url || "";
3230
3232
  url = ("" + url.replace(/\/+$/, "") + ending).replace("[project]", project);
3231
- return this.universal.isServer && url.startsWith("//") ? "http:" + url : url;
3233
+ return this.universal.isServer && needsProtocol ? "http:" + url : url;
3232
3234
  };
3233
3235
  ConfigService.prototype.getConfigValue = function (key) {
3234
3236
  return this.loadedConfig[key];