Skip to content

Commit

Permalink
Only set mask attribute if the corresponding mask exists (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhnt11 authored Jan 31, 2023
1 parent 62f389d commit 7a5f481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-sketch-canvas/src/Canvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ release drawing even when point goes out of canvas */
<g
id={`${id}__stroke-group-${i}`}
key={`${id}__stroke-group-${i}`}
mask={`url(#${id}__eraser-mask-${i})`}
mask={`${eraserPaths[i] && `url(#${id}__eraser-mask-${i})`}`}
>
<Paths id={`${id}__stroke-group-${i}__paths`} paths={pathGroup} />
</g>
Expand Down

0 comments on commit 7a5f481

Please sign in to comment.