Merge branch 'rfc-1' of github.com:sveltejs/svelte into rfc-1

pull/1839/head
Rich Harris 7 years ago
commit de3002b63a

@ -759,7 +759,7 @@ export default class Component {
const unsorted_reactive_declarations = []; const unsorted_reactive_declarations = [];
this.instance_script.content.body.forEach(node => { this.instance_script.content.body.forEach(node => {
if (node.type === 'LabeledStatement') { if (node.type === 'LabeledStatement' && node.label.name === '$') {
this.reactive_declaration_nodes.add(node); this.reactive_declaration_nodes.add(node);
const assignees = new Set(); const assignees = new Set();

@ -24,7 +24,7 @@ export function readable(start, value) {
if (index !== -1) subscribers.splice(index, 1); if (index !== -1) subscribers.splice(index, 1);
if (subscribers.length === 0) { if (subscribers.length === 0) {
stop(); stop && stop();
stop = null; stop = null;
} }
}; };

Loading…
Cancel
Save