We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7ddaae commit 3d85356Copy full SHA for 3d85356
src/Cropper.tsx
@@ -734,7 +734,7 @@ class Cropper extends React.Component<CropperProps, State> {
734
let adjustedCrop = this.props.crop
735
736
// Only scale if we're initialized and this is a legitimate resize
737
- if (this.isInitialized && this.previousCropSize) {
+ if (this.isInitialized && this.previousCropSize?.width && this.previousCropSize?.height) {
738
const sizeChanged =
739
Math.abs(this.previousCropSize.width - this.state.cropSize.width) > 1e-6 ||
740
Math.abs(this.previousCropSize.height - this.state.cropSize.height) > 1e-6
0 commit comments