From 941b7b50781b6a4c50530e0be1ee1bf1e06c2e3b Mon Sep 17 00:00:00 2001 From: Abdelhalim Riache Date: Mon, 31 Aug 2020 18:01:10 +0100 Subject: [PATCH] Fix undefined outros variable in transitions This error occures in the method transition_out when trying to use a component from external dependancy and wrapping it inside a
. Error message: Cannot read property 'c' of undefined. --- src/runtime/internal/transitions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/internal/transitions.ts b/src/runtime/internal/transitions.ts index ed23d3c1dd1e..9f326ee5e7e9 100644 --- a/src/runtime/internal/transitions.ts +++ b/src/runtime/internal/transitions.ts @@ -50,7 +50,7 @@ export function transition_in(block, local?: 0 | 1) { export function transition_out(block, local: 0 | 1, detach: 0 | 1, callback) { if (block && block.o) { - if (outroing.has(block)) return; + if (outroing.has(block) || !outros) return; outroing.add(block); outros.c.push(() => {