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: calculateBackgroundRendering may return width or height less than 1 #2982

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

herbertxy
Copy link

Bug:
Bug reports:
Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.

image

I console the value of width and height , find that the height is less than 1 caught this error
image
image

calculateBackgroundRendering function return value width height may be less than 1, then createPattern function throw error

Closing issues

Fixes #2981

nicDamours pushed a commit to nicDamours/html2canvas that referenced this pull request Nov 9, 2023
added fix from niklasvh#2982
Added prepare script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants