Fix panic when clicking spaces after slide page items.

This commit is contained in:
Zhwt 2024-04-29 09:50:12 +08:00 committed by GitHub
parent c766eefb38
commit ab1a0c7324
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ func main() {
SetRegions(true). SetRegions(true).
SetWrap(false). SetWrap(false).
SetHighlightedFunc(func(added, removed, remaining []string) { SetHighlightedFunc(func(added, removed, remaining []string) {
if len(added) == 0 {
return
}
pages.SwitchToPage(added[0]) pages.SwitchToPage(added[0])
}) })