diff --git a/src/components/Canvas.vue b/src/components/Canvas.vue index b3fe161..26492e8 100644 --- a/src/components/Canvas.vue +++ b/src/components/Canvas.vue @@ -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];