diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.95k stars 1.18k forks source link

Image under View render prop Not working #1936

Open Belkacem opened 2 years ago

Belkacem commented 2 years ago

Describe the bug Image under View render prop we get this error message : Error: TypeError: Cannot read properties of undefined (reading 'width')

To Reproduce Repl link

Expected behavior Should display an Image

Desktop (please complete the following information):

mirankorkmaz commented 2 years ago

I did ` const Quixote = () => (

);`

and it worked fine. Not sure why you do ` <View render={() =>

  } fixed />`
Belkacem commented 2 years ago

I need to render an image only on some pages

mirankorkmaz commented 2 years ago

If I've understood this dependency correctly, you need to do it manually. `const Quixote = () => (

Hello World

);`

Belkacem commented 2 years ago

Thanks for the effort, but your suggestion doesn't resolve the problem. even if my use case has another solution, there's clearly a bug here and FYI it was working on older versions of react-pdf. Cheers :-)

diegomura commented 21 hours ago

I'm not getting an error in the REPL