@@ -36,31 +36,31 @@ var AMDLoader;
3636 this . _detect ( ) ;
3737 return this . _isWindows ;
3838 } ,
39- enumerable : true ,
39+ enumerable : false ,
4040 configurable : true
4141 } ) ;
4242 Object . defineProperty ( Environment . prototype , "isNode" , {
4343 get : function ( ) {
4444 this . _detect ( ) ;
4545 return this . _isNode ;
4646 } ,
47- enumerable : true ,
47+ enumerable : false ,
4848 configurable : true
4949 } ) ;
5050 Object . defineProperty ( Environment . prototype , "isElectronRenderer" , {
5151 get : function ( ) {
5252 this . _detect ( ) ;
5353 return this . _isElectronRenderer ;
5454 } ,
55- enumerable : true ,
55+ enumerable : false ,
5656 configurable : true
5757 } ) ;
5858 Object . defineProperty ( Environment . prototype , "isWebWorker" , {
5959 get : function ( ) {
6060 this . _detect ( ) ;
6161 return this . _isWebWorker ;
6262 } ,
63- enumerable : true ,
63+ enumerable : false ,
6464 configurable : true
6565 } ) ;
6666 Environment . prototype . _detect = function ( ) {
@@ -199,6 +199,7 @@ var AMDLoader;
199199 return obj ;
200200 }
201201 if ( ! Array . isArray ( obj ) && Object . getPrototypeOf ( obj ) !== Object . prototype ) {
202+ // only clone "simple" objects
202203 return obj ;
203204 }
204205 var result = Array . isArray ( obj ) ? [ ] : { } ;
@@ -1217,6 +1218,7 @@ var AMDLoader;
12171218 this . _requireFunc = requireFunc ;
12181219 this . _moduleIdProvider = new ModuleIdProvider ( ) ;
12191220 this . _config = new AMDLoader . Configuration ( this . _env ) ;
1221+ this . _hasDependencyCycle = false ;
12201222 this . _modules2 = [ ] ;
12211223 this . _knownModules2 = [ ] ;
12221224 this . _inverseDependencies2 = [ ] ;
@@ -1561,6 +1563,9 @@ var AMDLoader;
15611563 result . getStats = function ( ) {
15621564 return _this . getLoaderEvents ( ) ;
15631565 } ;
1566+ result . hasDependencyCycle = function ( ) {
1567+ return _this . _hasDependencyCycle ;
1568+ } ;
15641569 result . config = function ( params , shouldOverwrite ) {
15651570 if ( shouldOverwrite === void 0 ) { shouldOverwrite = false ; }
15661571 _this . configure ( params , shouldOverwrite ) ;
@@ -1666,6 +1671,7 @@ var AMDLoader;
16661671 continue ;
16671672 }
16681673 if ( this . _hasDependencyPath ( dependency . id , module . id ) ) {
1674+ this . _hasDependencyCycle = true ;
16691675 console . warn ( 'There is a dependency cycle between \'' + this . _moduleIdProvider . getStrModuleId ( dependency . id ) + '\' and \'' + this . _moduleIdProvider . getStrModuleId ( module . id ) + '\'. The cyclic path follows:' ) ;
16701676 var cyclePath = this . _findCyclePath ( dependency . id , module . id , 0 ) || [ ] ;
16711677 cyclePath . reverse ( ) ;
0 commit comments