@stemy/ngx-utils 11.0.11 → 11.2.1

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.
@@ -2663,7 +2663,7 @@
2663
2663
  route: this.state.route,
2664
2664
  component: this.state.component,
2665
2665
  guard: guardType ? this.injector.get(guardType) : null,
2666
- dirty: false,
2666
+ dirty: true,
2667
2667
  first: true
2668
2668
  };
2669
2669
  this.components.push(info);
@@ -2987,11 +2987,12 @@
2987
2987
  var authKey = "Authorization";
2988
2988
  // If an authorization header exists and we still have an Unauthorized response prompt the user to log in again
2989
2989
  if (headers.has(authKey) && response.status == 401) {
2990
- _this.pushFailedRequest(url, options, function () {
2990
+ var pushed = _this.pushFailedRequest(url, options, function () {
2991
2991
  options.headers = _this.makeHeaders(options.originalHeaders);
2992
2992
  _this.toPromise(url, options, listener).then(resolve, reject);
2993
2993
  });
2994
- _this.handleUnauthorizedError(absoluteUrl, options, function () { return reject(response); });
2994
+ if (pushed)
2995
+ _this.handleUnauthorizedError(absoluteUrl, options, function () { return reject(response); });
2995
2996
  return;
2996
2997
  }
2997
2998
  reject(response);
@@ -3001,8 +3002,9 @@
3001
3002
  };
3002
3003
  BaseHttpService.prototype.pushFailedRequest = function (url, options, req) {
3003
3004
  if (url.indexOf("tokens") >= 0)
3004
- return;
3005
+ return false;
3005
3006
  BaseHttpService.failedRequests.push(req);
3007
+ return true;
3006
3008
  };
3007
3009
  BaseHttpService.prototype.checkHeaders = function (headers) {
3008
3010
  if (!headers || !headers.cookie || !headers.referer || !headers.host) {
@@ -3160,6 +3162,7 @@
3160
3162
  _this.loadJson().then(function (config) {
3161
3163
  _this.loadedConfig = config = Object.assign(_this.loadedConfig, config);
3162
3164
  _this.prepareConfig(config).then(function (c) {
3165
+ _this.loadedConfig = c;
3163
3166
  c.baseUrl = c.baseUrl || "/";
3164
3167
  resolve(c);
3165
3168
  });
@@ -3202,8 +3205,7 @@
3202
3205
  _this.http.get(configUrl).toPromise().then(function (response) {
3203
3206
  resolve(response);
3204
3207
  }, function () {
3205
- console.error("Config file not found at: " + configUrl);
3206
- resolve({});
3208
+ reject("Config file not found at: " + configUrl);
3207
3209
  });
3208
3210
  });
3209
3211
  };