fix: add error handling for dashboard card icon creation with fallback to default file icon
This commit is contained in:
parent
01841b8abe
commit
f539d02bcd
@ -3210,7 +3210,13 @@
|
||||
const icon = document.createElement("div");
|
||||
icon.className = "dashboard-card-icon";
|
||||
const fileIconName = getFileIcon(file.path);
|
||||
icon.appendChild(icon(fileIconName, 24));
|
||||
try {
|
||||
icon.appendChild(icon(fileIconName, 24));
|
||||
} catch (e) {
|
||||
console.error("Error creating icon:", fileIconName, e);
|
||||
// Fallback to default file icon
|
||||
icon.appendChild(icon("file", 24));
|
||||
}
|
||||
|
||||
const badge = document.createElement("span");
|
||||
badge.className = "dashboard-vault-badge";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user