Don't try to set empty default dashboard view.
@@ -38,17 +38,17 @@ class Dashboard extends React.Component {
componentWillReceiveProps(nextProps) {
// Setup views loaded from server.
+ // if (
+ // nextProps.data.base.length > 0 &&
+ // (nextProps.views === null || !nextProps.views.dashboards) &&
+ // _.isEmpty(this.props.reduxServerViews.dashboards.views) &&
+ // _.isEmpty(this.props.reduxBrowserViews.dashboards.views)
+ // ) {
+ // // no views on server, provide a default
+ // this.props.setBrowserViews(
+ // defaultViews((nextProps.buckets.edges[0] || {}).node),
+ // );
if (
- nextProps.data.base.length > 0 &&
- (nextProps.views === null || !nextProps.views.dashboards) &&
- _.isEmpty(this.props.reduxServerViews.dashboards.views) &&
- _.isEmpty(this.props.reduxBrowserViews.dashboards.views)
- ) {
- // no views on server, provide a default
- this.props.setBrowserViews(
- defaultViews((nextProps.buckets.edges[0] || {}).node),
- );
- } else if (
nextProps.views &&
nextProps.views.dashboards &&
!_.isEqual(nextProps.views, this.props.reduxServerViews)
