From 03f53f63926e86b0966209a78c24027bdfaa0638 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 11 Jan 2023 16:08:15 +0000 Subject: [PATCH] gallery: fix js error on digit-keypress viewing pics --- copyparty/web/baguettebox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index 25bcdef8..0f497fed 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -277,8 +277,8 @@ window.baguetteBox = (function () { playpause(); else if (k == "KeyU" || k == "KeyO") relseek(k == "KeyU" ? -10 : 10); - else if (k.indexOf('Digit') === 0) - vid().currentTime = vid().duration * parseInt(k.slice(-1)) * 0.1; + else if (k.indexOf('Digit') === 0 && v) + v.currentTime = v.duration * parseInt(k.slice(-1)) * 0.1; else if (k == "KeyM" && v) { v.muted = vmute = !vmute; mp_ctl();