Skip to content

Commit

Permalink
fix: updated condition to use another selector
Browse files Browse the repository at this point in the history
  • Loading branch information
mikitabut committed Jan 31, 2024
1 parent 57b749f commit 5d5a477
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/store/models/models.epics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,11 @@ const getModelsEpic: AppEpic = (action$, state$) =>
}),
map((response: OpenAIEntityModel[]) => {
const isOverlay = SettingsSelectors.selectIsOverlay(state$.value);
const enabledFeatures = SettingsSelectors.selectEnabledFeatures(
const isHeaderFeatureEnabled = SettingsSelectors.isFeatureEnabled(
state$.value,
Feature.Header,
);
if (
response.length === 0 &&
isOverlay &&
enabledFeatures.has(Feature.Header)
) {
if (response.length === 0 && isOverlay && isHeaderFeatureEnabled) {
signOut();
}
return ModelsActions.getModelsSuccess({ models: response });
Expand Down

0 comments on commit 5d5a477

Please sign in to comment.