This repository was archived by the owner on Jul 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -691,13 +691,8 @@ function logloads(loads) {
691
691
692
692
for ( var i = 0 , l = module . importers . length ; i < l ; i ++ ) {
693
693
var importerModule = module . importers [ i ] ;
694
- if ( importerModule . setters ) {
695
- var importerIndex = importerModule . dependencies . indexOf ( module ) ;
696
- if ( importerIndex != - 1 ) {
697
- var setter = importerModule . setters [ importerIndex ] ;
698
- setter ( moduleObj ) ;
699
- }
700
- }
694
+ var importerIndex = importerModule . dependencies . indexOf ( module ) ;
695
+ importerModule . setters [ importerIndex ] ( moduleObj ) ;
701
696
}
702
697
return value ;
703
698
} ) ;
@@ -712,8 +707,6 @@ function logloads(loads) {
712
707
var depName = load . dependencies [ i ] . value ;
713
708
var depModule = getOrCreateModuleRecord ( depName ) ;
714
709
715
- depModule . importers . push ( module ) ;
716
-
717
710
// if not already a module in the registry, try and link it now
718
711
if ( ! loader . modules [ depName ] ) {
719
712
@@ -731,6 +724,7 @@ function logloads(loads) {
731
724
console . assert ( depModule , 'Dependency module not found!' ) ;
732
725
733
726
module . dependencies . push ( depModule ) ;
727
+ depModule . importers . push ( module ) ;
734
728
735
729
// run the setter for this dependency
736
730
if ( module . setters [ i ] )
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import {fn1, variable1} from './circular1';
2
2
3
3
export var variable2 = 'test circular 2' ;
4
4
5
+ export { output as output1 } from './circular1' ;
6
+
5
7
fn1 ( ) ;
6
8
7
9
export var output ;
Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ export var counter = 0;
5
5
export function even ( n ) {
6
6
counter ++ ;
7
7
return n == 0 || odd ( n - 1 ) ;
8
- }
8
+ }
9
+
10
+ odd ( 1 ) ;
Original file line number Diff line number Diff line change @@ -211,7 +211,8 @@ function runTests() {
211
211
System [ 'import' ] ( 'syntax/circular2' ) . then ( function ( m2 ) {
212
212
assert (
213
213
[ m2 . output , 'test circular 1' ] ,
214
- [ m1 . output , 'test circular 2' ]
214
+ [ m1 . output , 'test circular 2' ] ,
215
+ [ m2 . output1 , 'test circular 2' ]
215
216
) ;
216
217
} , err ) ;
217
218
} , err ) ;
@@ -221,9 +222,9 @@ function runTests() {
221
222
System [ 'import' ] ( 'syntax/even' ) . then ( function ( m ) {
222
223
assert (
223
224
[ m . even ( 10 ) , true ] ,
224
- [ m . counter , 6 ] ,
225
+ [ m . counter , 7 ] ,
225
226
[ m . even ( 15 ) , false ] ,
226
- [ m . counter , 14 ]
227
+ [ m . counter , 15 ]
227
228
) ;
228
229
} , err ) ;
229
230
} ) ;
You can’t perform that action at this time.
0 commit comments