File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -447,16 +447,16 @@ var requestHostCallback;
447447var cancelHostCallback ;
448448var shouldYieldToHost ;
449449
450- if ( typeof window !== 'undefined' && window . _schedMock ) {
451- // Dynamic injection, only for testing purposes.
452- var windowImpl = window . _schedMock ;
453- requestHostCallback = windowImpl [ 0 ] ;
454- cancelHostCallback = windowImpl [ 1 ] ;
455- shouldYieldToHost = windowImpl [ 2 ] ;
456- getCurrentTime = windowImpl [ 3 ] ;
457- } else if ( typeof global !== 'undefined' && global . _schedMock ) {
450+ var globalValue = null ;
451+ if ( typeof window !== 'undefined' ) {
452+ globalValue = window ;
453+ } else if ( typeof global !== 'undefined' ) {
454+ globalValue = global ;
455+ }
456+
457+ if ( globalValue && globalValue . _schedMock ) {
458458 // Dynamic injection, only for testing purposes.
459- var globalImpl = global . _schedMock ;
459+ var globalImpl = globalValue . _schedMock ;
460460 requestHostCallback = globalImpl [ 0 ] ;
461461 cancelHostCallback = globalImpl [ 1 ] ;
462462 shouldYieldToHost = globalImpl [ 2 ] ;
You can’t perform that action at this time.
0 commit comments