zhaoyk 2 years ago
parent
commit
b8ffd70794
1 changed files with 3 additions and 0 deletions
  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";