diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 6487de2e9efa08..bdb240d9efc832 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -510,7 +510,7 @@ function setupChannel(target, channel) { if (typeof callback === 'function') { process.nextTick(callback, ex); } else { - this.emit('error', ex); // FIXME(bnoordhuis) Defer to next tick. + process.nextTick(() => this.emit('error', ex)); } return false; }; @@ -612,7 +612,7 @@ function setupChannel(target, channel) { if (typeof callback === 'function') { process.nextTick(callback, ex); } else { - this.emit('error', ex); // FIXME(bnoordhuis) Defer to next tick. + process.nextTick(() => this.emit('error', ex)); } } }