fix(StandaloneRouter): Fix broken query string parsing in StandaloneRouter. Pass location object to
fix #731
This commit is contained in:
1 parent
40bf1a2efd
commit
0e78836d55
2 files changed
+7
-2
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user