Skip to content

fix: excavate modules behind image in fallback rendering mode - #183

Open
feritcemkahraman wants to merge 1 commit into
react-component:masterfrom
feritcemkahraman:fix/excavate-fallback-cells
Open

feritcemkahraman wants to merge 1 commit into
react-component:masterfrom
feritcemkahraman:fix/excavate-fallback-cells

Conversation

@feritcemkahraman

Copy link
Copy Markdown

Summary

When imageSettings.excavate is true, cellsToDraw is calculated with excavated modules cleared in the region behind the embedded image. In the Path2D rendering path, cellsToDraw is used. However, in the fallback rendering branch (isSupportPath2d === false), the loop iterated over unexcavated cells instead of cellsToDraw, resulting in unexcavated modules being painted behind the image.

Changes

  • In src/QRCodeCanvas.tsx:
    • Iterate over cellsToDraw.forEach(...) instead of cells.forEach(...) in the non-Path2D fallback branch.
  • Added unit test in tests/fallback.test.tsx verifying that modules behind the embedded image are properly excavated when Path2D is unsupported.

@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@feritcemkahraman is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 77cfd733-8e48-4268-81cc-5c1bab55bec2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

1 participant