Skip to content

Commit

Permalink
Fix pentatonic sound move exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg authored Aug 30, 2023
1 parent a3587cc commit d8377e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/site/src/soundMove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function initModule(): Promise<SoundMove> {
await Promise.all(promises);

return node => {
if (node?.san) {
if (node?.san && node.uci) {
const pitch = keyToPitch(node.uci!.slice(2));
const instrument = isPawn(node.san) || isKing(node.san) ? 'clav' : 'celesta';
play(instrument, pitch);
Expand Down

0 comments on commit d8377e3

Please sign in to comment.