validate props
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
342246d77b
commit
5cb1a48466
|
@ -28,6 +28,13 @@ const clearCanvas = () => {
|
|||
const render = () => {
|
||||
const { vMargin, vRotation, hMargin, hMargin2, imageWidth, imageHeight } = props;
|
||||
|
||||
if (vMargin < 1 || hMargin < 1 || hMargin2 < 1) {
|
||||
return
|
||||
}
|
||||
if (imageWidth < 1 || imageHeight < 1) {
|
||||
return
|
||||
}
|
||||
|
||||
clearCanvas();
|
||||
|
||||
var hMargins = [hMargin, hMargin2];
|
||||
|
|
Loading…
Reference in New Issue