Skip to content

Commit 4355063

Browse files
aduh95RaisinTen
andcommitted
fixup! events: refactor to use more primordials
Co-authored-by: Darshan Sen <[email protected]>
1 parent 5e8dfd7 commit 4355063

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ function addCatch(that, promise, type, args) {
234234
const then = promise.then;
235235

236236
if (typeof then === 'function') {
237-
ReflectApply(then, promise, [undefined, function(err) {
237+
FunctionPrototypeCall(then, promise, undefined, function(err) {
238238
// The callback is called with nextTick to avoid a follow-up
239239
// rejection from this promise.
240240
process.nextTick(emitUnhandledRejectionOrErr, that, err, type, args);
241-
}]);
241+
});
242242
}
243243
} catch (err) {
244244
that.emit('error', err);

0 commit comments

Comments
 (0)