Skip to content

Commit

Permalink
fix(explore): chart link is broken without localStorage (#21707)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark authored Oct 7, 2022
1 parent 200bed6 commit 35d9cb3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions superset-frontend/src/explore/ExplorePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const getDashboardContextFormData = () => {
Object.assign(dashboardContextWithFilters, { dashboardId });
return dashboardContextWithFilters;
}
return {};
return null;
};

export default function ExplorePage() {
Expand All @@ -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,
Expand Down

0 comments on commit 35d9cb3

Please sign in to comment.