Skip to content

Commit

Permalink
capricorn86#701@patch: Fix handling of falsy CustomEvent detail value.
Browse files Browse the repository at this point in the history
  • Loading branch information
CSchulz committed Jan 28, 2023
1 parent 4c7ed33 commit 4c85f4b
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 !== undefined ? eventInit.detail : null;
}
}

Expand Down

0 comments on commit 4c85f4b

Please sign in to comment.