Fix custom feeds table issues

- Fix JavaScript error in removeCustomFeedRow (get tbody before removing row)
- Improve array conversion logic to handle nested paths like feeds.custom_feeds
- Add better error handling and debug logging for array conversion
- Ensure dicts with numeric keys are properly converted to arrays before validation
This commit is contained in:
Chuck
2026-01-05 14:57:42 -05:00
parent cefe17bd5f
commit a8c262f3b0
2 changed files with 23 additions and 7 deletions

View File

@@ -4888,10 +4888,15 @@
function removeCustomFeedRow(button) {
const row = button.closest('tr');
if (row && confirm('Remove this feed?')) {
row.remove();
// Re-index remaining rows
if (!row) return;
if (confirm('Remove this feed?')) {
const tbody = row.parentElement;
if (!tbody) return;
row.remove();
// Re-index remaining rows
const rows = tbody.querySelectorAll('.custom-feed-row');
rows.forEach((r, index) => {
r.setAttribute('data-index', index);