Skip to content

Commit 69ff9a3

Browse files
committed
fixup! events: refactor to use more primordials
1 parent 4355063 commit 69ff9a3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/internal/event_target.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const {
44
ArrayFrom,
55
Boolean,
66
Error,
7-
FunctionPrototypeCall,
87
FunctionPrototypeBind,
98
FunctionPrototypeCall,
109
NumberIsInteger,
@@ -592,11 +591,11 @@ function isEventTarget(obj) {
592591
function addCatch(that, promise, event) {
593592
const then = promise.then;
594593
if (typeof then === 'function') {
595-
ReflectApply(then, promise, [undefined, function(err) {
594+
FunctionPrototypeCall(then, promise, undefined, function(err) {
596595
// The callback is called with nextTick to avoid a follow-up
597596
// rejection from this promise.
598597
process.nextTick(emitUnhandledRejectionOrErr, that, err, event);
599-
}]);
598+
});
600599
}
601600
}
602601

0 commit comments

Comments
 (0)