From 61b6976d5950f14b479744e3ee7e2efd97cf4bcf Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Wed, 16 Feb 2022 01:02:31 +0300 Subject: [PATCH] Fix parseInt TypeScript error --- src/components/pages/UserParentalControl.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/pages/UserParentalControl.tsx b/src/components/pages/UserParentalControl.tsx index ce4fe71840..f4f9458641 100644 --- a/src/components/pages/UserParentalControl.tsx +++ b/src/components/pages/UserParentalControl.tsx @@ -145,7 +145,7 @@ const UserParentalControl: FunctionComponent = () => { for (const btnDelete of accessScheduleList.querySelectorAll('.btnDelete')) { btnDelete.addEventListener('click', function () { - const index = parseInt(btnDelete.getAttribute('data-index')); + const index = parseInt(btnDelete.getAttribute('data-index') || '0', 10); schedules.splice(index, 1); const newindex = schedules.filter(function (i: number) { return i != index;