Skip to content

Commit 2a2c1f2

Browse files
author
cedric Madoerin
committed
fix(EventEmitter) only apply if listener facebook#35577
1 parent 7adf6b1 commit 2a2c1f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/vendor/emitter/EventEmitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default class EventEmitter<TEventToArgsMap: {...}>
105105
> = this._registry[eventType];
106106
if (registrations != null) {
107107
for (const registration of [...registrations]) {
108-
registration.listener.apply(registration.context, args);
108+
registration.listener?.apply(registration.context, args);
109109
}
110110
}
111111
}

0 commit comments

Comments
 (0)