fix(ui): add RecentItem type + ad protection while building items

This commit is contained in:
Edouard Vanbelle
2026-05-18 23:06:50 +02:00
parent 79a12018b1
commit 82561a2b90
3 changed files with 41 additions and 10 deletions
+10 -2
View File
@@ -744,7 +744,11 @@ const ui = {
const frag = document.createDocumentFragment();
for (const folder of folders) {
frag.appendChild(this._createFolderItem(folder));
try {
frag.appendChild(this._createFolderItem(folder));
} catch (e) {
console.warn(`Error building folder item `, folder, `reason: `, e);
}
}
target.appendChild(frag);
},
@@ -759,7 +763,11 @@ const ui = {
const frag = document.createDocumentFragment();
for (const file of files) {
frag.appendChild(this._createFileItem(file));
try {
frag.appendChild(this._createFileItem(file));
} catch (e) {
console.warn(`Error building file item `, file, `reason: `, e);
}
}
target.appendChild(frag);
},