From e67b92eef7ed1d9434d43f41274c4d214e65d523 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Sat, 9 Nov 2019 11:38:57 -0500 Subject: [PATCH] fix types and addon version --- app/svelte/package.json | 2 +- app/svelte/src/client/preview/render.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/svelte/package.json b/app/svelte/package.json index a7d900ff51ec..58c5fee2679a 100644 --- a/app/svelte/package.json +++ b/app/svelte/package.json @@ -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", diff --git a/app/svelte/src/client/preview/render.ts b/app/svelte/src/client/preview/render.ts index 0f34ff017047..1a5e4f2c3a42 100644 --- a/app/svelte/src/client/preview/render.ts +++ b/app/svelte/src/client/preview/render.ts @@ -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; }