From 36c7d4270b8bc46c555b92539628bbbe4f49cc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9ry=20Mathieu=20=28Mathius=29?= Date: Tue, 22 Feb 2022 00:27:00 +0100 Subject: [PATCH] Lint conditional deletion of t in addCurrentTimeToURL inside player script Follow lint indications : https://github.com/iv-org/invidious/pull/2912#discussion_r811474927 --- assets/js/player.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index eed26e5c..f0b616a0 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -60,9 +60,8 @@ function addCurrentTimeToURL(url) { var currentTime = Math.ceil(player.currentTime()); if (currentTime > 0) urlUsed.searchParams.set('t', currentTime); - else - if (urlUsed.searchParams.has('t')) - urlUsed.searchParams.delete('t'); + else if (urlUsed.searchParams.has('t')) + urlUsed.searchParams.delete('t'); return urlUsed; }