MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / cleanUpNextTick

Function cleanUpNextTick

code/controlled-uncontrolled/public/app.js:817–830  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

815var queueIndex = -1;
816
817function cleanUpNextTick() {
818 if (!draining || !currentQueue) {
819 return;
820 }
821 draining = false;
822 if (currentQueue.length) {
823 queue = currentQueue.concat(queue);
824 } else {
825 queueIndex = -1;
826 }
827 if (queue.length) {
828 drainQueue();
829 }
830}
831
832function drainQueue() {
833 if (draining) {

Callers

nothing calls this directly

Calls 1

drainQueueFunction · 0.70

Tested by

no test coverage detected