Do not draw is no path is defined when drawing

This commit is contained in:
Hans5958 2022-04-17 12:37:31 +07:00
parent 67998c479e
commit 3833b208ea

View file

@ -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);