Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Modal: Property 'closeModal' does not exist #79

Closed
mrcnski opened this issue Feb 29, 2024 · 4 comments
Closed

Modal: Property 'closeModal' does not exist #79

mrcnski opened this issue Feb 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mrcnski
Copy link

mrcnski commented Feb 29, 2024

Thanks for the useful resource! I noticed that astro check throws the following error:

src/components/Modal.astro:216:10 - error ts(2339): Property 'closeModal' does not exist on type 'Window & typeof globalThis'.

216   window.closeModal = closeModal
             ~~~~~~~~~~

I believe it should simply be window.close. See also https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close.

@markteekman
Copy link
Member

Hey @mrcnski! Thanks for submitting the issue and providing a plausible solution, I really appreciate it 😊 I'll implement a fix when I've got the time for it!

@markteekman markteekman added the bug Something isn't working label Mar 9, 2024
@markteekman
Copy link
Member

@mrcnski I apologize that this is taking so long, I've been preoccupied with other projects. I'll try and look into it next week! 🙂

@mrcnski
Copy link
Author

mrcnski commented Apr 19, 2024

Thanks for the update and no worries! I just copied the component into my own project and fixed it there.

markteekman added a commit that referenced this issue Apr 22, 2024
markteekman added a commit that referenced this issue Apr 22, 2024
@markteekman
Copy link
Member

Resolved in #81, thanks @mrcnski! 😄

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants