Skip to content

Commit 21c3d0c

Browse files
authored
🐞 play: Fix dash reset issues (#466)
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([]) Pull-request: #466
1 parent b13ec7a commit 21c3d0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/play/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ function fill(ptr, len) {
870870
// dash is exported to evy go/wasm.
871871
function dash(ptr, len) {
872872
const s = memToString(ptr, len)
873-
const nums = s.split(" ").map(Number).map(transformX)
873+
const nums = s === "" ? [] : s.split(" ").map(Number).map(transformX)
874874
canvas.ctx.setLineDash(nums)
875875
}
876876

0 commit comments

Comments
 (0)