Skip to content

Commit

Permalink
fix types and addon version
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanarguello committed Nov 9, 2019
1 parent 5c91031 commit bed95e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "^5.2.5",
"@storybook/addons": "5.3.0-alpha.41",
"@storybook/core": "5.3.0-alpha.40",
"core-js": "^3.0.1",
"global": "^4.3.2",
Expand Down
5 changes: 3 additions & 2 deletions app/svelte/src/client/preview/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { document } from 'global';
import dedent from 'ts-dedent';
import { MountViewArgs, RenderMainArgs } from './types';

let previousComponent: any = null;
type Component = any;

let previousComponent: Component = null;

function cleanUpPreviousStory() {
if (!previousComponent) {
return;
}

previousComponent.$destroy();
previousComponent = null;
}
Expand Down
2 changes: 2 additions & 0 deletions app/svelte/src/client/preview/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ interface WrapperData {
innerStyle: string;
style: string;
}

export type Component = any;

0 comments on commit bed95e7

Please sign in to comment.