mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 16:01:06 +08:00
fix linkTo
This commit is contained in:
parent
da6e6ebd97
commit
535eb811b0
@ -17,7 +17,10 @@ interface ParamsCombo {
|
||||
|
||||
function parseQuery(queryString: string) {
|
||||
const query: Record<string, string> = {};
|
||||
const pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&');
|
||||
const pairs = (queryString[0] === '?' ? queryString.substring(1) : queryString)
|
||||
.split('&')
|
||||
.filter(Boolean);
|
||||
|
||||
// eslint-disable-next-line no-plusplus
|
||||
for (let i = 0; i < pairs.length; i++) {
|
||||
const pair = pairs[i].split('=');
|
||||
|
Loading…
x
Reference in New Issue
Block a user