Skip to content

Commit

Permalink
fix: 音声が一切鳴らなくなる可能性がある (#12491)
Browse files Browse the repository at this point in the history
* chore: 音声が一切鳴らなくなる可能性を軽減

#12433 (comment)

* chore: IIFEではなくPromise.prototype.finallyを使用するように
  • Loading branch information
anatawa12 authored Nov 29, 2023
1 parent 3b3b908 commit 4e88241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/scripts/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function play(operationType: OperationType) {
if (sound.type == null || !canPlay) return;

canPlay = false;
playFile(sound).then(() => {
playFile(sound).finally(() => {
// ごく短時間に音が重複しないように
setTimeout(() => {
canPlay = true;
Expand Down

0 comments on commit 4e88241

Please sign in to comment.