mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-07-04 15:37:58 +08:00
fix(lib): a class can now have zero slide and work (#125)
* fix(lib): a class can now have zero slide and work This fixes a previous issue that occured when a class didn't have any `pause` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -106,7 +106,10 @@ class Slide(Scene): # type:ignore
|
||||
def add_last_slide(self) -> None:
|
||||
"""Adds a 'last' slide to the end of slides."""
|
||||
|
||||
if self.current_animation == self.slides[-1].end_animation:
|
||||
if (
|
||||
len(self.slides) > 0
|
||||
and self.current_animation == self.slides[-1].end_animation
|
||||
):
|
||||
self.slides[-1].type = SlideType.last
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user