Skip to content

Commit

Permalink
play: Fix dash reset issues
Browse files Browse the repository at this point in the history
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([])
  • Loading branch information
juliaogris committed Mar 5, 2025
1 parent b13ec7a commit 0100341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/play/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 0100341

Please sign in to comment.