Skip to content
Permalink
Browse files

Suppress type error(not a function) on calling fastSeek (#5452)

  • Loading branch information...
rosylilly authored and Gargron committed Oct 18, 2017
1 parent 3810d98 commit 09d81defcda96eae7ffba36ccf1fb091ce08f17b
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/javascript/mastodon/middleware/sounds.js
@@ -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();

0 comments on commit 09d81de

Please sign in to comment.
You can’t perform that action at this time.