Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
fix: Fix "View in SQLLab" bug (apache#12086)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh authored Dec 17, 2020
1 parent 08b3ebe commit 655834b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,15 @@ class TabbedSqlEditors extends React.PureComponent {
}

// merge post form data with GET search params
// Hack: this data should be comming from getInitialState
// but for some reason this data isn't being passed properly through
// the reducer.
const appContainer = document.getElementById('app');
const bootstrapData = JSON.parse(
appContainer?.getAttribute('data-bootstrap') || '{}',
);
const query = {
...this.props.requestedQuery,
...bootstrapData.requested_query,
...URI(window.location).search(true),
};

Expand Down

0 comments on commit 655834b

Please sign in to comment.