-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: ensure window width and height are defined #42
Conversation
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.
👋 @helenamerk, thanks for using Emojisplosion and sending this PR! I'm excited that you're using it. And Glimpse looks really cool 😄 .
Could you describe a bit more detail about what you mean by "My client was returning NaN for window.outerHeight
and window.outerWidth
"? If that's the case I would think we'd want to isNaN
check here -- or if the case is that they're undefined
, I'd be very interested to know what client/browser is causing that.
8a8e9eb
to
62c1fc8
Compare
👋 hello @JoshuaKGoldberg !! Love this library. side note: Our team built out a few templates like "rocket" and "rainbow" that are super fun and might be neat additions to this project. Once we have some time we'll contribute more. Not sure why our client is not respecting |
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.
Thanks for the fix! I'll merge this in now and release a new version.
@helenamerk https://www.npmjs.com/package/emojisplosion/v/2.6.1 is now published. Cheers! |
fix: ensure window width and height are defined (JoshuaKGoldberg#42)
@allcontributors please add @helenamerk for bug. please add @helenamerk for code. |
I've put up a pull request to add @helenamerk! 🎉 |
My client was returning NaN for
window.outerHeight
andwindow.outerWidth
, making the actor remove itself prematurely.This change proposes falling back to
document.documentElement.clientHeight
anddocument.documentElement.clientWidth
(as those returned correct values)