@stemy/ngx-utils 11.2.5 → 11.2.6

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.
@@ -3157,15 +3157,7 @@
3157
3157
  }
3158
3158
  }
3159
3159
  this.baseConfig = baseConfig || {};
3160
- this.loadedConfig = Object.assign(!baseUrl ? {} : { baseUrl: baseUrl }, this.baseConfig);
3161
- try {
3162
- var url = new URL(this.loadedConfig.baseUrl);
3163
- var port = url.port && url.port !== "443" && url.port !== "80" ? ":" + url.port : "";
3164
- this.loadedConfig.baseDomain = url.protocol + "://" + url.hostname + port + "/";
3165
- }
3166
- catch (_a) {
3167
- this.loadedConfig.baseDomain = "/";
3168
- }
3160
+ this.loadedConfig = Object.assign(this.baseConfig, !baseUrl ? {} : { baseUrl: baseUrl, baseDomain: this.parseDomain(baseUrl) });
3169
3161
  this.scriptParameters = scriptParams || {};
3170
3162
  this.loaderFunc = function () {
3171
3163
  _this.loader = _this.loader || new Promise(function (resolve, reject) {
@@ -3203,6 +3195,16 @@
3203
3195
  enumerable: false,
3204
3196
  configurable: true
3205
3197
  });
3198
+ ConfigService.prototype.parseDomain = function (baseUrl) {
3199
+ try {
3200
+ var url = new URL(baseUrl);
3201
+ var port = url.port && url.port !== "443" && url.port !== "80" ? ":" + url.port : "";
3202
+ return url.protocol + "://" + url.hostname + port + "/";
3203
+ }
3204
+ catch (_a) {
3205
+ return "/";
3206
+ }
3207
+ };
3206
3208
  ConfigService.prototype.initService = function () {
3207
3209
  };
3208
3210
  ConfigService.prototype.loadJson = function () {