@@ -106,13 +106,14 @@ export const removeAttr = (el: HTMLElement, attr: string): void => {
106
106
export const isTag = ( tag : any , name : any ) : boolean =>
107
107
toString ( tag ) . toLowerCase ( ) === toString ( name ) . toLowerCase ( )
108
108
109
- export const requestAF : AnimationFrame =
110
- window . requestAnimationFrame ||
111
- window . webkitRequestAnimationFrame ||
112
- window . mozRequestAnimationFrame ||
113
- window . msRequestAnimationFrame ||
114
- window . oRequestAnimationFrame ||
115
- // Fallback, but not a true polyfill
116
- // Only needed for Opera Mini
117
- /* istanbul ignore next */
118
- ( ( cb ) => setTimeout ( cb , 16 ) )
109
+ export const requestAF : AnimationFrame = HAS_WINDOW_SUPPORT
110
+ ? window . requestAnimationFrame ||
111
+ window . webkitRequestAnimationFrame ||
112
+ window . mozRequestAnimationFrame ||
113
+ window . msRequestAnimationFrame ||
114
+ window . oRequestAnimationFrame ||
115
+ // Fallback, but not a true polyfill
116
+ // Only needed for Opera Mini
117
+ /* istanbul ignore next */
118
+ ( ( cb ) => setTimeout ( cb , 16 ) )
119
+ : ( cb ) => setTimeout ( cb , 0 )
0 commit comments