Skip to content

Commit

Permalink
[imagetool] Fix crash when checking crop boundaries without a value
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 6, 2020
1 parent 072d391 commit a0bffe2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/@sanity/imagetool/src/ImageTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const HOTSPOT_HANDLE_SIZE = 10
function checkCropBoundaries(value, delta) {
// Make the experience a little better. Still offsets when dragging back from outside
if (
!value ||
!value.crop ||
value.crop.top + delta.top < 0 ||
value.crop.left + delta.left < 0 ||
value.crop.right + delta.right < 0 ||
Expand Down

0 comments on commit a0bffe2

Please sign in to comment.