From f834f6b0d887edb81a51e0187b529b13ec2bb4cd Mon Sep 17 00:00:00 2001 From: Aleksandra Sikora Date: Wed, 5 Feb 2020 14:09:59 +0100 Subject: [PATCH] handle missed edge-cases introduced in #3041 (#3837) --- .../components/Services/Data/TableBrowseRows/FilterQuery.js | 5 +++++ .../src/components/Services/Data/TableBrowseRows/ViewRows.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/console/src/components/Services/Data/TableBrowseRows/FilterQuery.js b/console/src/components/Services/Data/TableBrowseRows/FilterQuery.js index 778cd4d841f..fa7e0d37d45 100644 --- a/console/src/components/Services/Data/TableBrowseRows/FilterQuery.js +++ b/console/src/components/Services/Data/TableBrowseRows/FilterQuery.js @@ -185,6 +185,11 @@ const renderSorts = (orderBy, tableSchema, dispatch) => { class FilterQuery extends Component { componentDidMount() { const dispatch = this.props.dispatch; + if (!this.props.urlQuery) { + dispatch(setDefaultQuery(this.props.curQuery)); + return; + } + let urlFilters = []; if (typeof this.props.urlQuery.filter === 'string') { urlFilters = [this.props.urlQuery.filter]; diff --git a/console/src/components/Services/Data/TableBrowseRows/ViewRows.js b/console/src/components/Services/Data/TableBrowseRows/ViewRows.js index 559e85b2da2..ff372ff67cd 100644 --- a/console/src/components/Services/Data/TableBrowseRows/ViewRows.js +++ b/console/src/components/Services/Data/TableBrowseRows/ViewRows.js @@ -638,7 +638,7 @@ const ViewRows = ({ count={count} tableName={curTableName} offset={offset} - urlQuery={location.query} + urlQuery={location && location.query} /> ); }