0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

assume let variables are dynamic in slots - fixes #3354

This commit is contained in:
Richard Harris 2019-08-06 08:47:00 -04:00
parent b9f5e7f249
commit 4b0ec650e9

View File

@ -84,6 +84,7 @@ export default class SlotWrapper extends Wrapper {
});
const dynamic_dependencies = Array.from(attribute.dependencies).filter(name => {
if (this.node.scope.is_let(name)) return true;
const variable = renderer.component.var_lookup.get(name);
return is_dynamic(variable);
});
@ -162,6 +163,7 @@ export default class SlotWrapper extends Wrapper {
const dynamic_dependencies = Array.from(this.dependencies).filter(name => {
if (name === '$$scope') return true;
if (this.node.scope.is_let(name)) return true;
const variable = renderer.component.var_lookup.get(name);
return is_dynamic(variable);
});