pull/10408/head
Rich Harris 3 years ago
parent ead3dabdba
commit 6c94d40f0c

@ -1280,7 +1280,12 @@ export function derived(init) {
create_computation_signal(flags | CLEAN, UNINITIALIZED, current_block) create_computation_signal(flags | CLEAN, UNINITIALIZED, current_block)
); );
signal.i = init; signal.i = init;
signal.x = current_component_context;
if (current_component_context) {
signal.x = current_component_context;
current_component_context.d.push(signal);
}
signal.e = default_equals; signal.e = default_equals;
if (current_consumer !== null) { if (current_consumer !== null) {
push_reference(current_consumer, signal); push_reference(current_consumer, signal);

@ -200,11 +200,7 @@ export function afterUpdate(fn) {
* @param {import('../internal/client/types.js').ComponentContext} context * @param {import('../internal/client/types.js').ComponentContext} context
*/ */
function init_update_callbacks(context) { function init_update_callbacks(context) {
const callbacks = (context.u = { const callbacks = (context.u = { a: [], b: [], m: [] });
a: [],
b: [],
m: []
});
if (is_ssr) return callbacks; // TODO this shouldn't be necessary but is, because of the tests if (is_ssr) return callbacks; // TODO this shouldn't be necessary but is, because of the tests

Loading…
Cancel
Save