-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
When specifying filter option, get error in embedFonts #26
Comments
Looks like you're filtering out the node you want to render. Make sure your filter matches that node. |
It doesn't matter what I'm actually trying to filter out - returning false from filter in any case results in I "fixed" it by changing this line: Now there's no exception, and it ends up rendering empty/invisible |
Take a look at this test to see how filter should be used. When calling toSvg, you should provide the node you want to render. If your filter does not return true for the node you've provided as first argument, then you'll get this error. Perhaps this situation should be handled better. But if you give right arguments (and make sure that root node passes the filter), your problem should be fixed |
Now it makes sense! My filter should've included the container node as well as the things I'm filtering in / out. Thank you for clearing this up. |
welcome :) |
FYI, starting from 2.1.0 this issue is handled better, the filter is no longer applied to the root node. |
Hi, first of all, thanks for making this library public. You are a saint.
Testing on Chrome 49.0.2623.87 (64-bit) / Mac. My document has embedded fonts ( Google Fonts )
I'm having a problem when specifying filter function to
.toSvg
- it fails when encounters a filtered out node.It fails / dies with the following error:
On line 198 inside
embedFonts
,node
is undefined. Because of all the Promises, I'm having a hard time actually debugging this. Do you have any ideas what could be causing this?The text was updated successfully, but these errors were encountered: