FIX wrapper not always being defined

This commit is contained in:
Norbert de Langen 2019-05-06 19:32:15 +02:00
parent aa153bc423
commit e9401d205d
2 changed files with 4 additions and 2 deletions

View File

@ -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({

View File

@ -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', () => ({