mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-26 22:27:58 -05:00
Fix remember opened categories (#4827)
#fix https://github.com/FreshRSS/FreshRSS/issues/4826 Was crashing if a category did not exist anymore
This commit is contained in:
committed by
GitHub
parent
0b8b2d2263
commit
992f2230bf
@@ -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 = '🔼';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user