about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSho Kusano <rosylilly@aduca.org>2017-10-19 00:13:51 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-10-18 17:13:51 +0200
commit09d81defcda96eae7ffba36ccf1fb091ce08f17b (patch)
tree47ba907e2c32fe9d6313840b58e0f34cba916afc
parent3810d98cd8423f78ad14ba53bdfdd1caf82e62ba (diff)
Suppress type error(not a function) on calling fastSeek (#5452)
-rw-r--r--app/javascript/mastodon/middleware/sounds.js6
1 files changed, 5 insertions, 1 deletions
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();