Update store.js

Co-Authored-By: Rich-Harris <richard.a.harris@gmail.com>
pull/1839/head
Conduitry 7 years ago committed by GitHub
parent 2451bf5b57
commit 44b61b1235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
} }
}; };
@ -85,4 +85,4 @@ export function derive(stores, fn) {
run_all(unsubscribers); run_all(unsubscribers);
}; };
}); });
} }

Loading…
Cancel
Save