File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1919 if ( typeof window === "undefined" ) {
2020 return null ;
2121 }
22+ // https://github.com/Semantic-Org/Semantic-UI/issues/3855
23+ // https://github.com/marcj/css-element-queries/issues/257
24+ var globalWindow = typeof window != 'undefined' && window . Math == Math
25+ ? window
26+ : typeof self != 'undefined' && self . Math == Math
27+ ? self
28+ : Function ( 'return this' ) ( ) ;
2229 // Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor.
2330 // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
2431 // would generate too many unnecessary events.
25- var requestAnimationFrame = window . requestAnimationFrame ||
26- window . mozRequestAnimationFrame ||
27- window . webkitRequestAnimationFrame ||
32+ var requestAnimationFrame = globalWindow . requestAnimationFrame ||
33+ globalWindow . mozRequestAnimationFrame ||
34+ globalWindow . webkitRequestAnimationFrame ||
2835 function ( fn ) {
29- return window . setTimeout ( fn , 20 ) ;
36+ return globalWindow . setTimeout ( fn , 20 ) ;
3037 } ;
3138
3239 /**
You can’t perform that action at this time.
0 commit comments