From ab1a0c7324b0f6cb0503b27bbd0af8247bbdd8b7 Mon Sep 17 00:00:00 2001 From: Zhwt Date: Mon, 29 Apr 2024 09:50:12 +0800 Subject: [PATCH] Fix panic when clicking spaces after slide page items. --- demos/presentation/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demos/presentation/main.go b/demos/presentation/main.go index 859cf64..351107f 100644 --- a/demos/presentation/main.go +++ b/demos/presentation/main.go @@ -55,6 +55,10 @@ func main() { SetRegions(true). SetWrap(false). SetHighlightedFunc(func(added, removed, remaining []string) { + if len(added) == 0 { + return + } + pages.SwitchToPage(added[0]) })