Skip to content

Commit

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

misskey-dev#12433 (comment)

* chore: IIFEではなくPromise.prototype.finallyを使用するように
  • Loading branch information
anatawa12 committed Nov 29, 2023
1 parent 7f26a79 commit 3f858a6
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 @@ -84,7 +84,7 @@ export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notifica
if (sound.type == null || !canPlay) return;

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

0 comments on commit 3f858a6

Please sign in to comment.