File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
active-expression-rewriting Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -378,10 +378,7 @@ const DependenciesToAExprs = {
378378 associate ( dep , aexpr ) {
379379 const location = aexpr . meta ( ) . get ( "location" ) ;
380380 if ( location && location . file ) {
381- if ( ! this . _AEsPerFile . has ( location . file ) ) {
382- this . _AEsPerFile . set ( location . file , new Set ( ) ) ;
383- }
384- this . _AEsPerFile . get ( location . file ) . add ( aexpr ) ;
381+ this . _AEsPerFile . getOrCreate ( location . file , ( ) => new Set ( ) ) . add ( aexpr ) ;
385382 }
386383 this . _depsToAExprs . associate ( dep , aexpr ) ;
387384 dep . updateTracking ( ) ;
Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ import { AExprRegistry } from 'src/client/reactive/active-expression/active-expr
55import Poll from 'src/client/reactive/components/rewritten/poll.js' ;
66export default class AexprTest extends Morph {
77 async initialize ( ) {
8- this . c = 10 ;
8+ this . c = 100 ;
99 this . windowTitle = "Active Expression Testing" ;
1010 this . aes = [ ] ;
11+
1112 this . y = 4 ;
1213 this . x = new Poll ( 4 ) ;
1314 this . createButton . addEventListener ( 'click' , ( ) => this . addAE ( ) ) ;
You can’t perform that action at this time.
0 commit comments