Skip to content

Commit

Permalink
fix handling of falsy CustomEvent detail value
Browse files Browse the repository at this point in the history
  • Loading branch information
CSchulz committed Jan 26, 2023
1 parent 4c7ed33 commit be538cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/happy-dom/src/event/events/CustomEvent.ts
Expand Up @@ -17,7 +17,7 @@ export default class CustomEvent extends Event {
super(type, eventInit);

if (eventInit) {
this.detail = eventInit.detail || null;
this.detail = eventInit.detail != null ? eventInit.detail : null;
}
}

Expand Down

0 comments on commit be538cb

Please sign in to comment.