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: ignore NaN points on pdf export #1135

Merged
merged 2 commits into from
Feb 25, 2024
Merged

Conversation

arpandaze
Copy link
Contributor

@arpandaze arpandaze commented Feb 23, 2024

While converting points to SVG path, the condition where dx and dy values of points are NaN isn't checked. So path returned by toSvgPath() becomes something like MNanNaNLNaNNaN which is invalid.This is the reason why PDF exports are failing. I have fixed that by filtering out NaN values.

image

Closes #1026
Closes #1125

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.30%. Comparing base (986f5e8) to head (efd2f82).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1135      +/-   ##
==========================================
- Coverage   37.37%   37.30%   -0.08%     
==========================================
  Files         108      108              
  Lines        8497     8497              
==========================================
- Hits         3176     3170       -6     
- Misses       5321     5327       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This was referenced Feb 23, 2024
@adil192
Copy link
Member

adil192 commented Feb 25, 2024

Thank you!

@adil192 adil192 merged commit bb6c24a into saber-notes:main Feb 25, 2024
2 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.

Can't export to pdf PDF exports not working
2 participants