Skip to content

Commit d968ab5

Browse files
committed
Update built source
1 parent f478d2a commit d968ab5

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

dist/ng-redux.js

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,31 @@
375375
// shim for using process in browser
376376

377377
var process = module.exports = {};
378+
379+
// cached from whatever global is present so that test runners that stub it
380+
// don't break things. But we need to wrap it in a try catch in case it is
381+
// wrapped in strict mode code which doesn't define any globals. It's inside a
382+
// function because try/catches deoptimize in certain engines.
383+
384+
var cachedSetTimeout;
385+
var cachedClearTimeout;
386+
387+
(function () {
388+
try {
389+
cachedSetTimeout = setTimeout;
390+
} catch (e) {
391+
cachedSetTimeout = function () {
392+
throw new Error('setTimeout is not defined');
393+
}
394+
}
395+
try {
396+
cachedClearTimeout = clearTimeout;
397+
} catch (e) {
398+
cachedClearTimeout = function () {
399+
throw new Error('clearTimeout is not defined');
400+
}
401+
}
402+
} ())
378403
var queue = [];
379404
var draining = false;
380405
var currentQueue;
@@ -399,7 +424,7 @@
399424
if (draining) {
400425
return;
401426
}
402-
var timeout = setTimeout(cleanUpNextTick);
427+
var timeout = cachedSetTimeout(cleanUpNextTick);
403428
draining = true;
404429

405430
var len = queue.length;
@@ -416,7 +441,7 @@
416441
}
417442
currentQueue = null;
418443
draining = false;
419-
clearTimeout(timeout);
444+
cachedClearTimeout(timeout);
420445
}
421446

422447
process.nextTick = function (fun) {
@@ -428,7 +453,7 @@
428453
}
429454
queue.push(new Item(fun, args));
430455
if (queue.length === 1 && !draining) {
431-
setTimeout(drainQueue, 0);
456+
cachedSetTimeout(drainQueue, 0);
432457
}
433458
};
434459

0 commit comments

Comments
 (0)