luci-app-opkg: fix bottom pager
authorJo-Philipp Wich <jo@mein.io>
Mon, 9 Jan 2023 23:01:00 +0000 (00:01 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 3 Apr 2023 11:45:03 +0000 (13:45 +0200)
Fixes: #6007, #6156
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ec3aac47c43d44d170af6a09d31493c2e8efe590)

applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js

index dd69161c8254067bfb7bea9cf1a135bc2d959b6b..d4d5b8b88b5b4f793c7b2b1f28e3091f4a94baca 100644 (file)
@@ -329,10 +329,9 @@ function display(pattern)
        for (var i = 0; i < pagers.length; i++) {
                pagers[i].parentNode.style.display = '';
                pagers[i].setAttribute('data-offset', 100);
-
-               if (i == 0)
-                       handlePage({ target: pagers[i].querySelector('.prev') });
        }
+
+       handlePage({ target: pagers[0].querySelector('.prev') });
 }
 
 function handlePage(ev)