This repository was archived by the owner on Jul 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -652,6 +652,7 @@ function logloads(loads) {
652652 if ( ! module || ! ( module instanceof Module ) )
653653 throw new TypeError ( 'Execution must define a Module instance' ) ;
654654 load . module = {
655+ name : load . name ,
655656 module : module
656657 } ;
657658 load . status = 'linked' ;
@@ -736,8 +737,12 @@ function logloads(loads) {
736737
737738 // only declarative modules have dynamic bindings
738739 if ( depModule . importers ) {
739- depModule . importers . push ( module ) ;
740740 module . dependencies . push ( depModule ) ;
741+ depModule . importers . push ( module ) ;
742+ }
743+ else {
744+ // track dynamic records as null module records as already linked
745+ module . dependencies . push ( null ) ;
741746 }
742747
743748 // run the setter for this dependency
@@ -801,6 +806,10 @@ function logloads(loads) {
801806
802807 for ( var i = 0 , l = deps . length ; i < l ; i ++ ) {
803808 var dep = deps [ i ] ;
809+ // dynamic dependencies are empty in module.dependencies
810+ // as they are already linked
811+ if ( ! dep )
812+ continue ;
804813 if ( indexOf . call ( seen , dep ) == - 1 ) {
805814 err = ensureEvaluated ( dep , seen , loader ) ;
806815 // stop on error, see https://bugs.ecmascript.org/show_bug.cgi?id=2996
You can’t perform that action at this time.
0 commit comments