changeset 1587:860e33127245

browser (slideshow): fix use of `current_slide` when there is no slide.
author Goffi <goffi@goffi.org>
date Sun, 10 Dec 2023 10:57:48 +0100
parents 3baf53a3590d
children 4ecae80d6d39
files libervia/web/pages/_browser/slideshow.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/web/pages/_browser/slideshow.py	Sun Dec 10 10:56:28 2023 +0100
+++ b/libervia/web/pages/_browser/slideshow.py	Sun Dec 10 10:57:48 2023 +0100
@@ -24,7 +24,7 @@
         try:
             return DOMNode(self.swiper.slides[self.swiper.realIndex])
         # getting missing item in JS arrays returns KeyError
-        except KeyError:
+        except (IndexError, KeyError):
             return None
 
     @property