Describe the bug
When returning a <Link> component from a render function react-pdf crashes with a error Unhandled Rejection (Error): Type mismatch.
Returning <Text> and <View> components work as expected. Only a <Link> somewhere in the returned structure causes the crash, as far as I have tested.
To Reproduce
This crashes the rendering
<Document>
<Page size="A4">
<View fixed render={({ pageNumber }) =>
<Link src="https://www.google.com">link</Link>
} />
</Page>
</Document>
This works as expected
<Document>
<Page size="A4">
<View>
<Link src="https://www.google.com">link</Link>
</View>
</Page>
</Document>
Expected behavior
The document renders the same way regardless if the children are returned from the render method or supplied as children to the component.
Desktop
- OS: Windows
- Browsers: All tested browsers (Edge, Chrome and Firefox) has the same issue
- React-pdf v1.6.12
Describe the bug
When returning a
<Link>component from a render function react-pdf crashes with a errorUnhandled Rejection (Error): Type mismatch.Returning
<Text>and<View>components work as expected. Only a<Link>somewhere in the returned structure causes the crash, as far as I have tested.To Reproduce
This crashes the rendering
This works as expected
Expected behavior
The document renders the same way regardless if the children are returned from the render method or supplied as children to the component.
Desktop