Skip to content

Commit

Permalink
fix(@nestjs/event-emitter): Also capture the case where target is null
Browse files Browse the repository at this point in the history
  • Loading branch information
zackdotcomputer committed Oct 27, 2023
1 parent 3e26b59 commit 36d68f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/events-metadata.accessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class EventsMetadataAccessor {
// Circumvent a crash that comes from reflect-metadata if it is
// given a non-object non-function target to reflect upon.
if (
target === undefined ||
!target ||
(typeof target !== 'function' && typeof target !== 'object')
) {
return undefined;
Expand Down

0 comments on commit 36d68f1

Please sign in to comment.