fix(explore): chart link is broken without localStorage (#21707)

This commit is contained in:
JUST.in DO IT 2022-10-07 11:11:04 -07:00 committed by GitHub
parent 200bed6f7e
commit 35d9cb38a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -101,7 +101,7 @@ const getDashboardContextFormData = () => {
Object.assign(dashboardContextWithFilters, { dashboardId });
return dashboardContextWithFilters;
}
return {};
return null;
};
export default function ExplorePage() {
@ -117,10 +117,12 @@ export default function ExplorePage() {
if (!isExploreInitialized.current || isSaveAction) {
fetchExploreData(exploreUrlParams)
.then(({ result }) => {
const formData = getFormDataWithDashboardContext(
result.form_data,
dashboardContextFormData,
);
const formData = dashboardContextFormData
? getFormDataWithDashboardContext(
result.form_data,
dashboardContextFormData,
)
: result.form_data;
dispatch(
hydrateExplore({
...result,