From ba2f3d0aaaffb6651ade35e720984fcafff02df5 Mon Sep 17 00:00:00 2001 From: catosaurusrex2003 Date: Sun, 6 Oct 2024 16:11:07 +0530 Subject: [PATCH] ensure tabIndex is a number before proceeding in condition --- playground/components/Tab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/components/Tab.tsx b/playground/components/Tab.tsx index 0a46bd414..d48d906c7 100644 --- a/playground/components/Tab.tsx +++ b/playground/components/Tab.tsx @@ -19,7 +19,7 @@ class Tab extends Component { { event.preventDefault(); - if (parentCallback && tabIndex) { + if (parentCallback && typeof tabIndex === 'number') { parentCallback(tabIndex); } }}