From 13de8370b5afa79b12dace370c32b1dfa1889e2a Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Thu, 20 Jun 2024 14:07:13 -0700 Subject: [PATCH] Return early if tab or panel are undefined --- src/tab-container-element.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tab-container-element.ts b/src/tab-container-element.ts index ebccbd9..2742175 100644 --- a/src/tab-container-element.ts +++ b/src/tab-container-element.ts @@ -362,6 +362,9 @@ export class TabContainerElement extends HTMLElement { const selectedTab = tabs[index] const selectedPanel = panels[index] + if (!selectedTab) return + if (!selectedPanel) return + if (this.#setupComplete) { const cancelled = !this.dispatchEvent( new TabContainerChangeEvent('tab-container-change', { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy