From 73f6d207ea12a5c619760af0e7e07b435ca885d4 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Tue, 18 May 2021 01:55:22 +0800 Subject: [PATCH] Restore "Autoplay media files" behavior ## Issue Closes 6078 `"Autoplay media files = disable" is broken` `if (-1)` is "truthy" --- ui/component/fileRenderInitiator/view.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/component/fileRenderInitiator/view.jsx b/ui/component/fileRenderInitiator/view.jsx index 6d36569c9..134c5556b 100644 --- a/ui/component/fileRenderInitiator/view.jsx +++ b/ui/component/fileRenderInitiator/view.jsx @@ -59,7 +59,7 @@ export default function FileRenderInitiator(props: Props) { // get current url const url = window.location.href; // check if there is a time parameter, if so force autoplay - if (url.indexOf('t=')) { + if (url.indexOf('t=') > -1) { autoplay = true; }