Skip to content

Commit 1398681

Browse files
refactored setImmediate shim;
1 parent 6c9ebdc commit 1398681

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/core/CPAxios.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ const CPromise = require('c-promise2');
33
const {Axios} = axios;
44

55
const isThenable = (thing) => thing && typeof thing.then === 'function';
6-
const _setImmediate = typeof setImmediate === 'function' ? setImmediate : function setImmediateShim(cb) {
7-
setTimeout(cb, 0)
8-
}
6+
const _setImmediate = typeof setImmediate === 'function' ? setImmediate : setTimeout;
97

108
class CPAxios extends Axios {
119
request(config) {

0 commit comments

Comments
 (0)