summaryrefslogtreecommitdiff
path: root/lib/doDuring.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/doDuring.js')
-rw-r--r--lib/doDuring.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/doDuring.js b/lib/doDuring.js
index 14a5ae1..c536f30 100644
--- a/lib/doDuring.js
+++ b/lib/doDuring.js
@@ -1,5 +1,6 @@
import noop from 'lodash/noop';
import rest from 'lodash/rest';
+import onlyOnce from './internal/onlyOnce';
/**
* The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
@@ -23,7 +24,7 @@ import rest from 'lodash/rest';
* will be passed an error if one occured, otherwise `null`.
*/
export default function doDuring(fn, test, callback) {
- callback = callback || noop;
+ callback = onlyOnce(callback || noop);
var next = rest(function(err, args) {
if (err) return callback(err);