Explodes when image loads when crop={ undefined } (before onChange fires)
See original GitHub issueThis is a regression since 3.0.11, and exists in 4.0.1—4.0.4:
- While you can initially omit the crop object, any subsequent change will need to be saved to state in the onChange callback and passed here.
Initially we pass crop={ undefined }
, and update crop=
only after onChange
fires. Since at least 4.0.1, react-image-crop
will crash in onImageLoad
’s call of getPixelCrop(image, this.props.crop)
, because at image load time this.props.crop
is still undefined
(because we haven’t fired onChange
yet with that value)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Image fires onload event, but image is still undefined
i inside the event handlers are always equal to imageArray.length - 1 , because i increases during the loop.
Read more >imagepng - Manual - PHP
this file opens a picture from $imagepath and returns it as a valid picture to embed in: <img src="file.php?image=123.jpg[?maxX=200&maxY=150]"> (in ...
Read more >ZIM Docs - Text Version - ZIMjs
There may be a security error when loading images locally for any Canvas app. Please read https://zimjs.com/tips.html#IMAGES for easy solutions. Before ZIM ...
Read more >Firescope Home
The following CDF memo outlines the Southern California firefight that occurred during late September and early October 1970. This Santa Ana wind event...
Read more >FAQs • Loudoun County, VA • CivicEngage
4. I am on the third priority list (lives in Loudoun County/works outside Loudoun County), but if my new job is located in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 5.0.0. Please try it out and let me know if you have any issues.
sorry we haven’t had a chance to bump it internally yet! thanks for your help 😃