diff --git a/packages/lb-annotation/src/utils/tool/DrawUtils.ts b/packages/lb-annotation/src/utils/tool/DrawUtils.ts index 638cf2a45..87807fcf3 100644 --- a/packages/lb-annotation/src/utils/tool/DrawUtils.ts +++ b/packages/lb-annotation/src/utils/tool/DrawUtils.ts @@ -312,6 +312,10 @@ export default class DrawUtils { lineType: ELineTypes; }> = {}, ): void { + if (pointList.length < 2) { + return; + } + const ctx: CanvasRenderingContext2D = canvas.getContext('2d')!; const { color = DEFAULT_COLOR, lineType = ELineTypes.Line } = options;