From 0100341f98a20b17b153d06c39bf1e6d98d0dd7f Mon Sep 17 00:00:00 2001 From: Julia Ogris Date: Tue, 4 Mar 2025 17:12:39 -0800 Subject: [PATCH] play: Fix dash reset issues Fix dash reset issues with an explicit check for `dash`. Previously it resulted in the incorrect: canvas.ctx.setLineDash([0]) Now it results in the correct: canvas.ctx.setLineDash([]) --- frontend/play/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/play/index.js b/frontend/play/index.js index af47fcd1..76cf4ff3 100644 --- a/frontend/play/index.js +++ b/frontend/play/index.js @@ -870,7 +870,7 @@ function fill(ptr, len) { // dash is exported to evy go/wasm. function dash(ptr, len) { const s = memToString(ptr, len) - const nums = s.split(" ").map(Number).map(transformX) + const nums = s === "" ? [] : s.split(" ").map(Number).map(transformX) canvas.ctx.setLineDash(nums) }