mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 00:12:22 +08:00
refactor(addons/links): resolve ts-expect-error
This commit is contained in:
parent
a81b40504f
commit
cabfab8a52
@ -37,9 +37,7 @@ export const hrefTo = (title: ComponentTitle, name: StoryName): Promise<string>
|
||||
return new Promise((resolve) => {
|
||||
const { location } = document;
|
||||
const query = parseQuery(location.search);
|
||||
// @ts-expect-error (Converted from ts-ignore)
|
||||
const existingId = [].concat(query.id)[0];
|
||||
// @ts-expect-error (Converted from ts-ignore)
|
||||
const existingId = query.id;
|
||||
const titleToLink = title || existingId.split('--', 2)[0];
|
||||
const id = toId(titleToLink, name);
|
||||
const path = `/story/${id}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user