Skip to content

Conversation

@KillerKady
Copy link
Contributor

Fix:
#16710

I managed to recreate the bug with the example from the issue.

If hint square is 0 => opts.hint === 0, the expression:
hint = opts.hint && { orig: makeSquare(opts.hint), brush: 'green' }
will evaluate to 0 and not proceed into the makeSquare function. The resulting hint will be 0 instead of the object { orig: makeSquare(0), brush: 'green' }

Before:

hintshowBefore.mp4

With the fix its working ok:

hintshow.mp4

@niklasf niklasf linked an issue Jan 5, 2025 that may be closed by this pull request
@niklasf niklasf merged commit 9c8c964 into lichess-org:master Jan 5, 2025
3 checks passed
@niklasf
Copy link
Member

niklasf commented Jan 5, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hint button not working on puzzle #Z8yJS

2 participants