fix: rename icon variable to iconContainer to avoid shadowing Lucide icon function
This commit is contained in:
parent
f539d02bcd
commit
1c2e867585
@ -3207,15 +3207,15 @@
|
||||
const header = document.createElement("div");
|
||||
header.className = "dashboard-card-header";
|
||||
|
||||
const icon = document.createElement("div");
|
||||
icon.className = "dashboard-card-icon";
|
||||
const iconContainer = document.createElement("div");
|
||||
iconContainer.className = "dashboard-card-icon";
|
||||
const fileIconName = getFileIcon(file.path);
|
||||
try {
|
||||
icon.appendChild(icon(fileIconName, 24));
|
||||
iconContainer.appendChild(icon(fileIconName, 24));
|
||||
} catch (e) {
|
||||
console.error("Error creating icon:", fileIconName, e);
|
||||
// Fallback to default file icon
|
||||
icon.appendChild(icon("file", 24));
|
||||
iconContainer.appendChild(icon("file", 24));
|
||||
}
|
||||
|
||||
const badge = document.createElement("span");
|
||||
@ -3232,7 +3232,7 @@
|
||||
this.toggleBookmark(file.vault, file.path, file.title, card);
|
||||
});
|
||||
|
||||
header.appendChild(icon);
|
||||
header.appendChild(iconContainer);
|
||||
header.appendChild(badge);
|
||||
header.appendChild(bookmarkBtn);
|
||||
card.appendChild(header);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user