We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e08729 commit 0fbfafdCopy full SHA for 0fbfafd
src/webapp/services/parse-url.js
@@ -1,8 +1,8 @@
1
import parse from 'url-parse';
2
3
export default function parseUrl(urlString) {
4
- const {hash} = parse(urlString);
5
- const {pathname, query} = parse(hash.replace(/^#\/?/, '/'), true);
+ const hash = parse(urlString).hash.replace(/^#\/?/, '/') || '/';
+ const {pathname, query} = parse(hash, true);
6
const path = pathname === '/' ? [] : pathname.split('/').slice(1);
7
return {path, query};
8
}
0 commit comments