This repository was archived by the owner on Jul 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -687,13 +687,18 @@ function logloads(loads) {
687
687
// NB This should be an Object.defineProperty, but that is very slow.
688
688
// By disaling this module write-protection we gain performance.
689
689
// It could be useful to allow an option to enable or disable this.
690
+ module . locked = true ;
690
691
moduleObj [ name ] = value ;
691
692
692
693
for ( var i = 0 , l = module . importers . length ; i < l ; i ++ ) {
693
694
var importerModule = module . importers [ i ] ;
694
- var importerIndex = importerModule . dependencies . indexOf ( module ) ;
695
- importerModule . setters [ importerIndex ] ( moduleObj ) ;
695
+ if ( ! importerModule . locked ) {
696
+ var importerIndex = importerModule . dependencies . indexOf ( module ) ;
697
+ importerModule . setters [ importerIndex ] ( moduleObj ) ;
698
+ }
696
699
}
700
+
701
+ module . locked = false ;
697
702
return value ;
698
703
} ) ;
699
704
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import {fn2, variable2} from './circular2';
2
2
3
3
export var variable1 = 'test circular 1' ;
4
4
5
+ export { output as output2 } from './circular2' ;
6
+
5
7
fn2 ( ) ;
6
8
7
9
export var output ;
Original file line number Diff line number Diff line change @@ -212,7 +212,8 @@ function runTests() {
212
212
assert (
213
213
[ m2 . output , 'test circular 1' ] ,
214
214
[ m1 . output , 'test circular 2' ] ,
215
- [ m2 . output1 , 'test circular 2' ]
215
+ [ m2 . output1 , 'test circular 2' ] ,
216
+ [ m1 . output2 , 'test circular 1' ]
216
217
) ;
217
218
} , err ) ;
218
219
} , err ) ;
You can’t perform that action at this time.
0 commit comments