fix(StandaloneRouter): Fix broken query string parsing in StandaloneRouter. Pass location object to

fix #731
This commit is contained in:
Erik Ziegler committed 2019-07-29 17:26:17 +02:00
1 parent 40bf1a2efd
commit 0e78836d55
2 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -188,7 +188,7 @@ class OHIFStandaloneViewer extends Component {
this.setState({ isLoading: false });
}}
>
{match === null ? <></> : <Component match={match} />}
{match === null ? <></> : <Component match={match} location={this.props.location}/>}
</CSSTransition>
)}
</Route>
+6 -1
View File
@@ -90,7 +90,12 @@ class StandaloneRouting extends Component {
async componentDidMount() {
try {
const query = qs.parse(this.props.location.search);
let { search } = this.props.location;
// Remove ? prefix which is included for some reason
search = search.slice(1, search.length);
const query = qs.parse(search);
const studies = await StandaloneRouting.parseQueryAndFetchStudies(query);
studyMetadataManager.purge();