From 3833b208ea59464bd2ab88230fad83c6932641d6 Mon Sep 17 00:00:00 2001 From: Hans5958 Date: Sun, 17 Apr 2022 12:37:31 +0700 Subject: [PATCH] Do not draw is no path is defined when drawing --- web/_js/draw.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/_js/draw.js b/web/_js/draw.js index 7d69c8d6..29fd815b 100644 --- a/web/_js/draw.js +++ b/web/_js/draw.js @@ -374,6 +374,8 @@ function initDraw() { function render(path) { + if (!Array.isArray(path)) return + context.globalCompositeOperation = "source-over"; context.clearRect(0, 0, canvas.width, canvas.height);