From 71db03b553fa1fb94901dab5132b347f53f555d4 Mon Sep 17 00:00:00 2001 From: Diamond Lewis Date: Thu, 25 Aug 2022 13:19:33 -0500 Subject: [PATCH] fix: Remove unnecessary count operations in Data Browser --- src/dashboard/Data/Browser/Browser.react.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dashboard/Data/Browser/Browser.react.js b/src/dashboard/Data/Browser/Browser.react.js index 341c46f9d3..d1dbaa5c07 100644 --- a/src/dashboard/Data/Browser/Browser.react.js +++ b/src/dashboard/Data/Browser/Browser.react.js @@ -171,10 +171,11 @@ class Browser extends DashboardView { if (this.props.params.appId !== nextProps.params.appId || !this.props.params.className) { this.setState({ counts: {} }); Parse.Object._clearAllState(); + + nextProps.schema.dispatch(ActionTypes.FETCH) + .then(() => this.handleFetchedSchema()); } this.prefetchData(nextProps, nextContext); - nextProps.schema.dispatch(ActionTypes.FETCH) - .then(() => this.handleFetchedSchema()); } if (!nextProps.params.className && nextProps.schema.data.get('classes')) { this.redirectToFirstClass(nextProps.schema.data.get('classes'), nextContext);