-
Notifications
You must be signed in to change notification settings - Fork 472
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
Added explicit error message for Promises passed to getWindowFromNode #646
Added explicit error message for Promises passed to getWindowFromNode #646
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2a42a49:
|
Codecov Report
@@ Coverage Diff @@
## master #646 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 565 574 +9
Branches 141 145 +4
=========================================
+ Hits 565 574 +9
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just one thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you!
@all-contributors please add @JoshuaKGoldberg for code and tests |
I've put up a pull request to add @JoshuaKGoldberg! 🎉 |
🎉 This PR is included in version 7.15.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Added a nice explicit error message for the case in #609 of a
Promise
or Promise-like passed to a function that expects a DOM node.Why:
Better error messages = happier users! 💝
How:
Per #609 (comment), checked if
node.then instanceof Function
.Checklist:
docs site N/A
I'm not attached to this particular error message, if a reviewer can think of something better that'd be nice.