Skip to content

fix: resolve canvas error in game modals#470

Merged
steam-bell-92 merged 2 commits into
steam-bell-92:mainfrom
Bhavikapatel06:fix/global-canvas-getcontext-error
May 20, 2026
Merged

fix: resolve canvas error in game modals#470
steam-bell-92 merged 2 commits into
steam-bell-92:mainfrom
Bhavikapatel06:fix/global-canvas-getcontext-error

Conversation

@Bhavikapatel06
Copy link
Copy Markdown
Contributor

@Bhavikapatel06 Bhavikapatel06 commented May 19, 2026

📝 Description

Fixed the global canvas initialization issue causing multiple game modals such as Whack-a-Mole and Word Scramble to fail.

Added proper canvas existence checks in hero-canvas.js to prevent getContext null errors and improve game modal stability.

🔗 Linked Issue

Closes #456


📋 Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.
image image

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@Bhavikapatel06 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Bhavikapatel06
Copy link
Copy Markdown
Contributor Author

Hi, I tried to deploy the project on Vercel, but it says authorization is required for deployment to the team project. Could you please check and approve/authorize it?

@steam-bell-92 steam-bell-92 merged commit 7073212 into steam-bell-92:main May 20, 2026
1 of 2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug]: Whack-a-Mole Game Fails to Start Due to getContext Null Error

2 participants