mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix parseInt TypeScript error
This commit is contained in:
parent
93b12cf74b
commit
61b6976d59
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ const UserParentalControl: FunctionComponent = () => {
|
||||||
|
|
||||||
for (const btnDelete of accessScheduleList.querySelectorAll('.btnDelete')) {
|
for (const btnDelete of accessScheduleList.querySelectorAll('.btnDelete')) {
|
||||||
btnDelete.addEventListener('click', function () {
|
btnDelete.addEventListener('click', function () {
|
||||||
const index = parseInt(btnDelete.getAttribute('data-index'));
|
const index = parseInt(btnDelete.getAttribute('data-index') || '0', 10);
|
||||||
schedules.splice(index, 1);
|
schedules.splice(index, 1);
|
||||||
const newindex = schedules.filter(function (i: number) {
|
const newindex = schedules.filter(function (i: number) {
|
||||||
return i != index;
|
return i != index;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue