mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 13:31:19 +08:00
FIX wrapper not always being defined
This commit is contained in:
parent
aa153bc423
commit
e9401d205d
@ -61,8 +61,8 @@ export default function render({
|
||||
} = storyFn();
|
||||
|
||||
cleanUpPreviousStory();
|
||||
const DefaultCompatComponent = Component.default || Component;
|
||||
const DefaultCompatWrapper = Wrapper.default || Wrapper;
|
||||
const DefaultCompatComponent = Component ? Component.default || Component : undefined;
|
||||
const DefaultCompatWrapper = Wrapper ? Wrapper.default || Wrapper : undefined;
|
||||
|
||||
if (!DefaultCompatComponent) {
|
||||
showError({
|
||||
|
@ -4,6 +4,8 @@ import { action } from '@storybook/addon-actions';
|
||||
|
||||
import Button from '../components/Button.svelte';
|
||||
|
||||
console.log({ Button });
|
||||
|
||||
storiesOf('Addon|Centered', module)
|
||||
.addDecorator(Centered)
|
||||
.add('rounded', () => ({
|
||||
|
Loading…
x
Reference in New Issue
Block a user