Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Commit e256c38

Browse files
committed
Spy web doesn't work on IE11 and Edge
1 parent ae337d9 commit e256c38

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"es6-promisify": "^6.0.0",
2525
"grommet": "^1.1.0",
2626
"prop-types": "^15.5.8",
27+
"query-string": "^6.1.0",
2728
"react": "^16.0.0",
2829
"react-dom": "^16.0.0",
2930
"react-intl": "^2.2.3",

src/components/XCSpyApp.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { XCSpyState } from "../reducers/spyReducer";
1212
import { Dispatch } from "redux";
1313
import { setCompositionModel, initSession } from "../actions";
1414
import { withRouter, Redirect } from "react-router-dom";
15-
import { } from "types/react-router-dom";
1615
import { routes } from "../utils/routes";
16+
import * as queryString from "query-string";
1717

1818
interface XCSpyAppGlobalProps extends XCSpyAppProps, XCSpyAppCallbackProps {
1919
}
@@ -72,10 +72,10 @@ class XCSpyApp extends React.Component<XCSpyAppGlobalProps, XCSpyState> {
7272
}
7373

7474
const mapStateToProps = (state: XCSpyState, ownProps): XCSpyAppProps => {
75-
const urlSearchParams = new URLSearchParams(ownProps.location.search);
76-
const currentComponent = urlSearchParams.get(routes.params.currentComponent);
77-
const serverUrl = urlSearchParams.get(routes.params.serverUrl);
78-
const api = urlSearchParams.get(routes.params.api);
75+
const values = queryString.parse(ownProps.location.search);
76+
const currentComponent = values[routes.params.currentComponent];
77+
const serverUrl = values[routes.params.serverUrl];
78+
const api = values[routes.params.api];
7979
return {
8080
initialized: state.compositionModel.initialized,
8181
api,

yarn.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,10 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
14071407
version "1.2.0"
14081408
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
14091409

1410+
decode-uri-component@^0.2.0:
1411+
version "0.2.0"
1412+
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
1413+
14101414
deep-assign@^2.0.0:
14111415
version "2.0.0"
14121416
resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-2.0.0.tgz#ebe06b1f07f08dae597620e3dd1622f371a1c572"
@@ -4759,6 +4763,13 @@ query-string@^4.1.0:
47594763
object-assign "^4.1.0"
47604764
strict-uri-encode "^1.0.0"
47614765

4766+
query-string@^6.1.0:
4767+
version "6.1.0"
4768+
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a"
4769+
dependencies:
4770+
decode-uri-component "^0.2.0"
4771+
strict-uri-encode "^2.0.0"
4772+
47624773
querystring-es3@^0.2.0:
47634774
version "0.2.1"
47644775
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
@@ -5683,6 +5694,10 @@ strict-uri-encode@^1.0.0:
56835694
version "1.1.0"
56845695
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
56855696

5697+
strict-uri-encode@^2.0.0:
5698+
version "2.0.0"
5699+
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
5700+
56865701
string-length@^1.0.1:
56875702
version "1.0.1"
56885703
resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac"

0 commit comments

Comments
 (0)