@@ -960,18 +960,10 @@ export function set_signal_value(signal, value) {
960
960
schedule_effect ( current_effect , false ) ;
961
961
}
962
962
mark_signal_consumers ( signal , DIRTY , true ) ;
963
- // This logic checks if there are any render effects queued after the above marking
964
- // of consumers. If there are render effects that have the same component context as
965
- // the source signal we're writing to, then we can bail-out of this logic as there
966
- // will be a render effect in the queue that hopefully takes case of triggering the
967
- // beforeUpdate/afterUpdate logic (doing it again here would duplicate them). However,
968
- // if the render effects scheduled in the queue are unrelated to the component context,
969
- // then we need to trigger the beforeUpdate/afterUpdate logic here instead.
963
+ // If we have afterUpdates locally on the component, but we're within a render effect
964
+ // then we will need to manually invoke the beforeUpdate/afterUpdate logic.
970
965
// TODO: should we put this being a is_runes check and only run it in non-runes mode?
971
- if (
972
- current_effect === null &&
973
- current_queued_pre_and_render_effects . every ( ( e ) => e . context !== component_context )
974
- ) {
966
+ if ( current_effect === null && current_queued_pre_and_render_effects . length === 0 ) {
975
967
const update_callbacks = component_context ?. update_callbacks ;
976
968
if ( update_callbacks != null ) {
977
969
update_callbacks . before . forEach ( /** @param {any } c */ ( c ) => c ( ) ) ;
0 commit comments