File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed
Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change 1- export /* istanbul ignore next */ var raf = typeof window !== 'undefined' ?
2- (
3- (
1+ export /* istanbul ignore next */ var raf = ( function ( ) {
2+ if ( typeof window !== 'undefined' ) {
3+ var rAF = (
44 window . requestAnimationFrame ||
55 window . mozRequestAnimationFrame ||
66 window . webkitRequestAnimationFrame
7- ) ||
8- function ( cb ) {
9- return setTimeout ( cb , 50 / 3 ) ;
10- }
11- ) . bind ( window )
12- : ( ) => { } ;
7+ ) ;
8+ if ( rAF ) return rAF . bind ( window ) ;
9+ }
10+ return function ( cb ) {
11+ return setTimeout ( cb , 50 / 3 ) ;
12+ } ;
13+ } ) ( ) ;
1314
14- export /* istanbul ignore next */ var caf = typeof window !== 'undefined' ?
15- (
16- (
15+ export /* istanbul ignore next */ var caf = ( function ( ) {
16+ if ( typeof window !== 'undefined' ) {
17+ var cAF = (
1718 window . cancelAnimationFrame ||
1819 window . mozCancelAnimationFrame ||
1920 window . webkitCancelAnimationFrame
20- ) ||
21- clearTimeout
22- ) . bind ( window )
23- : ( ) => { } ;
21+ ) ;
22+ if ( cAF ) return cAF . bind ( window ) ;
23+ }
24+ return clearTimeout ;
25+ } ) ( ) ;
2426
2527export function binsearch ( arr , prop , key ) {
2628 var mid = 0 ;
You can’t perform that action at this time.
0 commit comments