@@ -327,22 +327,23 @@ function is_signal_dirty(signal) {
327
327
*/
328
328
function execute_signal_fn ( signal ) {
329
329
const init = signal . i ;
330
+ const flags = signal . f ;
330
331
const previous_dependencies = current_dependencies ;
331
332
const previous_dependencies_index = current_dependencies_index ;
332
333
const previous_untracked_writes = current_untracked_writes ;
333
334
const previous_consumer = current_consumer ;
334
335
const previous_block = current_block ;
335
336
const previous_component_context = current_component_context ;
336
337
const previous_skip_consumer = current_skip_consumer ;
337
- const is_render_effect = ( signal . f & RENDER_EFFECT ) !== 0 ;
338
+ const is_render_effect = ( flags & RENDER_EFFECT ) !== 0 ;
338
339
const previous_untracking = current_untracking ;
339
340
current_dependencies = /** @type {null | import('./types.js').Signal[] } */ ( null ) ;
340
341
current_dependencies_index = 0 ;
341
342
current_untracked_writes = null ;
342
343
current_consumer = signal ;
343
344
current_block = signal . b ;
344
345
current_component_context = signal . x ;
345
- current_skip_consumer = ! is_flushing_effect && ( signal . f & UNOWNED ) !== 0 ;
346
+ current_skip_consumer = ! is_flushing_effect && ( flags & UNOWNED ) !== 0 ;
346
347
current_untracking = false ;
347
348
348
349
// Render effects are invoked when the UI is about to be updated - run beforeUpdate at that point
@@ -412,6 +413,10 @@ function execute_signal_fn(signal) {
412
413
if ( consumers === null ) {
413
414
dependency . c = [ signal ] ;
414
415
} else if ( consumers [ consumers . length - 1 ] !== signal ) {
416
+ // TODO: should this be:
417
+ //
418
+ // } else if (!consumers.includes(signal)) {
419
+ //
415
420
consumers . push ( signal ) ;
416
421
}
417
422
}
@@ -970,7 +975,7 @@ export function get(signal) {
970
975
) {
971
976
if ( current_dependencies === null ) {
972
977
current_dependencies = [ signal ] ;
973
- } else if ( signal !== current_dependencies [ current_dependencies . length - 1 ] ) {
978
+ } else {
974
979
current_dependencies . push ( signal ) ;
975
980
}
976
981
}
0 commit comments