1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

fix: Fixed bug in history view preventing toggle-view

This commit is contained in:
ivaosthu 2019-03-06 19:15:33 +01:00
parent 41e4ed59fd
commit fba362f66a
2 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
The latest version of this document is always available in
[releases][releases-url].
## [next]
- fix: Fixed bug in history view preventing toggle-view.
## [3.2.0]
- feat: Initial beta support for variants

View File

@ -41,7 +41,7 @@ export default class ViewFeatureToggleComponent extends React.Component {
activeTab: PropTypes.string.isRequired,
featureToggleName: PropTypes.string.isRequired,
features: PropTypes.array.isRequired,
betaFlags: PropTypes.array.isRequired,
betaFlags: PropTypes.array,
toggleFeature: PropTypes.func,
removeFeatureToggle: PropTypes.func,
revive: PropTypes.func,
@ -53,6 +53,10 @@ export default class ViewFeatureToggleComponent extends React.Component {
hasPermission: PropTypes.func.isRequired,
};
static defaultProps = {
betaFlags: [],
};
componentWillMount() {
if (this.props.features.length === 0) {
if (this.isFeatureView) {