Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Suppress type error(not a function) on calling fastSeek (mastodon#5452)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosylilly authored and Gargron committed Oct 18, 2017
1 parent 3810d98 commit 09d81de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/javascript/mastodon/middleware/sounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ const createAudio = sources => {
const play = audio => {
if (!audio.paused) {
audio.pause();
audio.fastSeek(0);
if (typeof audio.fastSeek === 'function') {
audio.fastSeek(0);
} else {
audio.seek(0);
}
}

audio.play();
Expand Down

0 comments on commit 09d81de

Please sign in to comment.