From 7e618eb2b11a85ad941773a8a2fec85b07a6b38c Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Thu, 18 May 2023 23:03:51 +0800 Subject: [PATCH] Fix initial prev/next --- paginator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paginator.js b/paginator.js index 4d45e71..caa4740 100644 --- a/paginator.js +++ b/paginator.js @@ -740,7 +740,7 @@ export class Paginator extends HTMLElement { if (this.#canGoToIndex(resolved.index)) return this.#goTo(resolved) } #scrollPrev() { - if (!this.#view) return + if (!this.#view) return true if (this.scrolled) { if (this.start > 0) return this.#scrollTo(Math.max(0, this.start - this.size), null, true) @@ -751,7 +751,7 @@ export class Paginator extends HTMLElement { return this.#scrollToPage(page, null, true).then(() => page <= 0) } #scrollNext() { - if (!this.#view) return + if (!this.#view) return true if (this.scrolled) { if (this.viewSize - this.end > 2) return this.#scrollTo(Math.min(this.viewSize, this.end), null, true)