Skip to content

Commit

Permalink
fix(EcentEmitter) only apply if listener exists facebook#35577
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric Madoerin committed Feb 7, 2023
1 parent 7adf6b1 commit 721ea29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/vendor/emitter/EventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class EventEmitter<TEventToArgsMap: {...}>
> = this._registry[eventType];
if (registrations != null) {
for (const registration of [...registrations]) {
registration.listener.apply(registration.context, args);
registration?.listener?.apply(registration.context, args);
}
}
}
Expand Down

0 comments on commit 721ea29

Please sign in to comment.