fix(StandaloneRouter): Fix broken query string parsing in StandaloneRouter. Pass location object to
fix #731
This commit is contained in:
parent
40bf1a2efd
commit
0e78836d55
@ -188,7 +188,7 @@ class OHIFStandaloneViewer extends Component {
|
|||||||
this.setState({ isLoading: false });
|
this.setState({ isLoading: false });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{match === null ? <></> : <Component match={match} />}
|
{match === null ? <></> : <Component match={match} location={this.props.location}/>}
|
||||||
</CSSTransition>
|
</CSSTransition>
|
||||||
)}
|
)}
|
||||||
</Route>
|
</Route>
|
||||||
|
|||||||
@ -90,7 +90,12 @@ class StandaloneRouting extends Component {
|
|||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
try {
|
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);
|
const studies = await StandaloneRouting.parseQueryAndFetchStudies(query);
|
||||||
|
|
||||||
studyMetadataManager.purge();
|
studyMetadataManager.purge();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user