diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 363845949b..92fdab212c 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -759,7 +759,7 @@ export default class Component { const unsorted_reactive_declarations = []; this.instance_script.content.body.forEach(node => { - if (node.type === 'LabeledStatement') { + if (node.type === 'LabeledStatement' && node.label.name === '$') { this.reactive_declaration_nodes.add(node); const assignees = new Set(); @@ -980,4 +980,4 @@ function process_meta(component, nodes) { } return meta; -} \ No newline at end of file +} diff --git a/store.js b/store.js index ae2955a258..ffef5c7ca8 100644 --- a/store.js +++ b/store.js @@ -24,7 +24,7 @@ export function readable(start, value) { if (index !== -1) subscribers.splice(index, 1); if (subscribers.length === 0) { - stop(); + stop && stop(); stop = null; } }; @@ -85,4 +85,4 @@ export function derive(stores, fn) { run_all(unsubscribers); }; }); -} \ No newline at end of file +}