fix: Fix storybook (no-changelog) (#4624)
since we migrated to vite, storybook/webpack aren't doing all the babel transforms. that's we we need to revert all optional-chaining and nullish-coalescing in design-system. Hopefully this will be remedied after we move to vite for storybook.
This commit is contained in:
committed by
GitHub
parent
423ee81e33
commit
58630e43c0
@@ -1,3 +1,3 @@
|
||||
export function addTargetBlank(html: string) {
|
||||
return html?.includes('href=') ? html.replace(/href=/g, 'target="_blank" href=') : html;
|
||||
return html && html.includes('href=') ? html.replace(/href=/g, 'target="_blank" href=') : html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user