diff options
| author | 2023-10-30 22:23:25 +0100 | |
|---|---|---|
| committer | 2023-10-30 22:23:25 +0100 | |
| commit | 9b3a867c35ac68a1e7f4c96cf4ace5728b6fb855 (patch) | |
| tree | ef6427ab95f2d0e938553a1ca21dd3f776b93bba /p/scripts | |
| parent | 21a279179a5e496082f4e43c5a2a5e10d90c0bdb (diff) | |
Fix JS regression dropdown label (#5785)
#fix https://github.com/FreshRSS/FreshRSS/issues/5784
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 93aac281e..42d7aeef4 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -854,7 +854,7 @@ function init_column_categories() { const itemId = a.closest('.item').id; const templateId = itemId.substring(0, 2) === 't_' ? 'tag_config_template' : 'feed_config_template'; const id = itemId.substr(2); - const feed_web = a.getAttribute('data-fweb'); + const feed_web = a.getAttribute('data-fweb') || ''; const div = a.parentElement; const dropdownMenu = div.querySelector('.dropdown-menu'); const template = document.getElementById(templateId) @@ -863,8 +863,11 @@ function init_column_categories() { a.href = '#dropdown-' + id; div.querySelector('.dropdown-target').id = 'dropdown-' + id; div.insertAdjacentHTML('beforeend', template); - if (feed_web.length < 1) { - div.querySelector('.item.link.website').remove(); + if (feed_web == '') { + const website = div.querySelector('.item.link.website'); + if (website) { + website.remove(); + } } const b = div.querySelector('button.confirm'); if (b) { |
