From 09d81defcda96eae7ffba36ccf1fb091ce08f17b Mon Sep 17 00:00:00 2001 From: Sho Kusano Date: Thu, 19 Oct 2017 00:13:51 +0900 Subject: [PATCH] Suppress type error(not a function) on calling fastSeek (#5452) --- app/javascript/mastodon/middleware/sounds.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/middleware/sounds.js b/app/javascript/mastodon/middleware/sounds.js index 372e7c835..3d1e3eaba 100644 --- a/app/javascript/mastodon/middleware/sounds.js +++ b/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();