-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CustomEvent does not take falsy detail value #701
Labels
bug
Something isn't working
Comments
CSchulz
added a commit
to CSchulz/happy-dom
that referenced
this issue
Jan 26, 2023
CSchulz
added a commit
to CSchulz/happy-dom
that referenced
this issue
Jan 28, 2023
CSchulz
added a commit
to CSchulz/happy-dom
that referenced
this issue
Jan 28, 2023
CSchulz
added a commit
to CSchulz/happy-dom
that referenced
this issue
Jan 28, 2023
@capricorn86 Did you forget my patch? It seems not to be merged into master. |
capricorn86
added a commit
that referenced
this issue
Feb 3, 2023
#701@patch: fix handling of falsy CustomEvent detail value
Hi @CSchulz! 🙂 I'm sorry, it seems like I made a mistake when merging your pull request and just closed it instead 🤦♂️ Not sure how it happened. It has been merged now and will be released any moment. |
It has been released now: Thanks again for your contribution! 🌟 |
CSchulz
added a commit
to CSchulz/happy-dom
that referenced
this issue
Feb 3, 2023
capricorn86
added a commit
that referenced
this issue
Feb 3, 2023
#701@trivial: Add CustomEvent test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
new CustomEvent(eventName, { detail: undefined })
detail
is nullExpected behavior
The
detail
value should return the given inputdetail
value.Device:
Additional context
Wrong handling of
detail
with falsy check:happy-dom/packages/happy-dom/src/event/events/CustomEvent.ts
Lines 19 to 22 in 4c7ed33
The text was updated successfully, but these errors were encountered: