Skip to content

Commit 0e6a787

Browse files
replace window.URL with URL from url-parse (#140)
* replace window.URL with URL from url-parse * upgrade @types/url-parse to latest Co-authored-by: Liam Ma <lma2@atlassian.com>
1 parent 5b0825d commit 0e6a787

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"@types/lodash.noop": "^3.0.6",
9898
"@types/react": "^16.9.35",
9999
"@types/react-dom": "^16.9.8",
100-
"@types/url-parse": "^1.4.3",
100+
"@types/url-parse": "^1.4.8",
101101
"@typescript-eslint/eslint-plugin": "^2.33.0",
102102
"@typescript-eslint/parser": "^2.33.0",
103103
"babel-eslint": "^10.0.2",

src/common/utils/create-location/parse-path.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import URL from 'url-parse';
2+
13
export function parsePath(path: string) {
24
const url = new URL(path, 'ws://a.a');
35
const isAbsolute = path.startsWith('/');
@@ -7,7 +9,7 @@ export function parsePath(path: string) {
79

810
return {
911
pathname,
10-
search: url.search,
12+
search: url.query,
1113
hash: url.hash,
1214
};
1315
}

0 commit comments

Comments
 (0)