File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -673,20 +673,24 @@ var esl;
673673 * @param {string } id 模块id
674674 */
675675 function modUpdatePreparedState ( id ) {
676- var updatingModules = { } ;
676+ var moduleUpdatingState = { } ;
677677 update ( id ) ;
678678
679679 function update ( id ) {
680680 modPrepare ( id ) ;
681+
681682 if ( ! modIs ( id , MODULE_ANALYZED ) ) {
682683 return false ;
683684 }
684685
685- if ( modIs ( id , MODULE_PREPARED ) || updatingModules [ id ] ) {
686- return true ;
686+ switch ( moduleUpdatingState [ id ] ) {
687+ case 1 :
688+ return true ;
689+ case 2 :
690+ return modIs ( id , MODULE_PREPARED ) ;
687691 }
688692
689- updatingModules [ id ] = 1 ;
693+ moduleUpdatingState [ id ] = 1 ;
690694 var mod = modModules [ id ] ;
691695 var prepared = true ;
692696
@@ -711,8 +715,9 @@ var esl;
711715
712716 if ( prepared ) {
713717 modSetState ( id , MODULE_PREPARED ) ;
714- updatingModules [ id ] = 0 ;
715718 }
719+
720+ moduleUpdatingState [ id ] = 2 ;
716721 return prepared ;
717722 }
718723 }
You can’t perform that action at this time.
0 commit comments