Skip to content
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: Error createCanvas function not found #11170

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

hassnian
Copy link
Contributor

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Issue

canvasRegex uses the global flag (g), which causes the regex's lastIndex to be updated after each match. This results in returning null on alternating calls, leading to show Error createCanvas function not found

either this solution or remove the global flag g

Screenshot 📸

  • [] My fix has changed something on UI;

…ew instance.

- creates a new regex instance each time to fix lastIndex issues with the global flag, ensuring consistent matching in canvas validation.
@hassnian hassnian requested a review from a team as a code owner October 29, 2024 12:29
@hassnian hassnian requested review from vikiival and Jarsen136 and removed request for a team October 29, 2024 12:29
Copy link

netlify bot commented Oct 29, 2024

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 49c6e5e
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/6720d5212d66d1000843ddec
😎 Deploy Preview https://deploy-preview-11170--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@vikiival vikiival added this pull request to the merge queue Oct 29, 2024
Merged via the queue into kodadot:main with commit 0439e14 Oct 29, 2024
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: createCanvas function not found.
4 participants