@hmcts/rpx-xui-common-lib 1.9.0-persist-postcode → 1.9.0-route-expected-feature

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.
@@ -783,7 +783,7 @@
783
783
  */
784
784
  FeatureToggleGuard.prototype.canActivate = function (route) {
785
785
  var _this = this;
786
- return rxjs.combineLatest.apply(void 0, __spread(route.data.needsFeaturesEnabled.map(function (feature) { return _this.featureToggleService.getValueOnce(feature, false); }))).pipe(operators.map(function (featureStatuses) { return featureStatuses.every(function (status) { return status; }); }), operators.map(function (status) { return status || _this.router.parseUrl(route.data.featureDisabledRedirect); }));
786
+ return rxjs.combineLatest(__spread(route.data.needsFeaturesEnabled.map(function (feature) { return _this.featureToggleService.getValueOnce(feature, false); }))).pipe(operators.map(function (featureStatuses) { return featureStatuses.every(function (status) { return status; }); }), operators.map(function (status) { return (route.data.expectFeatureEnabled !== false && status) || (!route.data.expectFeatureEnabled && !status) || _this.router.parseUrl(route.data.featureDisabledRedirect); }));
787
787
  };
788
788
  return FeatureToggleGuard;
789
789
  }());