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

View File

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