Skip to content

Commit

Permalink
Merge pull request #702 from CSchulz/patch-1
Browse files Browse the repository at this point in the history
#701@patch: fix handling of falsy CustomEvent detail value
  • Loading branch information
capricorn86 committed Feb 3, 2023
2 parents 8cd5a95 + 839d1ce commit cdd1b99
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 cdd1b99

Please sign in to comment.