Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize the additional clusters state when receiving config. #1813

Merged
merged 3 commits into from
Jun 24, 2020

Conversation

absoludity
Copy link
Contributor

Description of the change

Initializes the additional clusters redux state when receiving the application configuration.

Benefits

Part of #1762

default: state.clusters.default,
};
const config = action.payload as IConfig;
config.featureFlags.additionalClusters.forEach(cluster => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small fail-safe in case additionalClusters is not defined (like in a local config file): config.featureFlags.additionalClusters && config.featureFlags.additionalClusters.forEach...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use config.featureFlags.additionalClusters?.forEach . Added a failing test and fixed with that (had to delete the property from a valid IConfig to stop ts from complaining :)

@absoludity absoludity merged commit 8d8fd4d into master Jun 24, 2020
@absoludity absoludity deleted the 1762-set-state-from-config branch June 24, 2020 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants