zhaoyk 2 年之前
父节点
当前提交
b8ffd70794
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      adm_comp/src/lib/UIUtils.ts

+ 3 - 0
adm_comp/src/lib/UIUtils.ts

@@ -84,6 +84,9 @@ export class ViewTool {
 	}
 	
 	static drawText(ctx: CanvasRenderingContext2D, content: string, location: Point, size: Point):void{
+		if(!content)
+			return;
+			
 		const fontSize = 10;
 		ctx.font = "lighter " + fontSize + "px Microsoft YaHei";
 		ctx.textBaseline = "bottom";