From 3860accad0f2c4ad0128be47fecaf38ca718b8bd Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:10:29 +0200 Subject: [PATCH] simplify --- components/VtBotDebug.astro | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/components/VtBotDebug.astro b/components/VtBotDebug.astro index 183f470..1add6b8 100644 --- a/components/VtBotDebug.astro +++ b/components/VtBotDebug.astro @@ -554,12 +554,9 @@ const active = import.meta.env.DEV || production; } function animationEnd(e: Event) { - if (e instanceof AnimationEvent) { - animations[transition(e)] && - animations[transition(e)]![e.pseudoElement] && - animations[transition(e)]![e.pseudoElement]![e.animationName] && - (animations[transition(e)]![e.pseudoElement]![e.animationName]!.end = e); - } + e instanceof AnimationEvent && + animations[transition(e)]?.[e.pseudoElement]?.[e.animationName] && + (animations[transition(e)]![e.pseudoElement]![e.animationName]!.end = e); } /*