diff options
| author | 2022-11-07 19:23:03 +0100 | |
|---|---|---|
| committer | 2022-11-07 19:23:03 +0100 | |
| commit | 992f2230bf2a4ea4266fe7518d91551374a11fac (patch) | |
| tree | 7e9e56a5bc44a9f4a8e3068ae50a09b0d00cbe9d /p | |
| parent | 0b8b2d2263e7e4676de8d6c8e8de59c72fe5b3e0 (diff) | |
Fix remember opened categories (#4827)
#fix https://github.com/FreshRSS/FreshRSS/issues/4826
Was crashing if a category did not exist anymore
Diffstat (limited to 'p')
| -rw-r--r-- | p/scripts/main.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 30fc795a1..268fd2858 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -777,8 +777,10 @@ function rememberOpenCategory(category_id, isOpen) { function openCategory(category_id) { const category_element = document.getElementById(category_id); + if (!category_element) return; category_element.querySelector('.tree-folder-items').classList.add('active'); const img = category_element.querySelector('a.dropdown-toggle img'); + if (!img) return; img.src = img.src.replace('/icons/down.', '/icons/up.'); img.alt = '🔼'; } |
