File tree Expand file tree Collapse file tree 3 files changed +23
-33
lines changed
Expand file tree Collapse file tree 3 files changed +23
-33
lines changed Original file line number Diff line number Diff line change 528528
529529 /**
530530 * Continues with the callback on the next tick.
531+ * @function
531532 * @param {function(...[*]) } callback Callback to execute
532533 * @inner
533534 */
534- function nextTick ( callback ) {
535- if ( typeof process !== 'undefined' && typeof process . nextTick === 'function' ) {
536- if ( typeof setImmediate === 'function' )
537- setImmediate ( callback ) ;
538- else
539- process . nextTick ( callback ) ;
540- } else
541- setTimeout ( callback , 0 ) ;
542- }
535+ var nextTick = typeof process !== 'undefined' && process && typeof process . nextTick === 'function'
536+ ? ( typeof setImmediate === 'function' ? setImmediate : process . nextTick )
537+ : setTimeout ;
543538
544539 /**
545540 * Converts a JavaScript string to UTF8 bytes.
Original file line number Diff line number Diff line change 22
33/**
44 * Continues with the callback on the next tick.
5+ * @function
56 * @param {function(...[*]) } callback Callback to execute
67 * @inner
78 */
8- function nextTick ( callback ) {
9- if ( typeof process !== 'undefined' && typeof process . nextTick === 'function' ) {
10- if ( typeof setImmediate === 'function' )
11- setImmediate ( callback ) ;
12- else
13- process . nextTick ( callback ) ;
14- } else
15- setTimeout ( callback , 0 ) ;
16- }
9+ var nextTick = typeof process !== 'undefined' && process && typeof process . nextTick === 'function'
10+ ? ( typeof setImmediate === 'function' ? setImmediate : process . nextTick )
11+ : setTimeout ;
1712
1813/**
1914 * Converts a JavaScript string to UTF8 bytes.
You can’t perform that action at this time.
0 commit comments