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");
|
const header = document.createElement("div");
|
||||||
header.className = "dashboard-card-header";
|
header.className = "dashboard-card-header";
|
||||||
|
|
||||||
const icon = document.createElement("div");
|
const iconContainer = document.createElement("div");
|
||||||
icon.className = "dashboard-card-icon";
|
iconContainer.className = "dashboard-card-icon";
|
||||||
const fileIconName = getFileIcon(file.path);
|
const fileIconName = getFileIcon(file.path);
|
||||||
try {
|
try {
|
||||||
icon.appendChild(icon(fileIconName, 24));
|
iconContainer.appendChild(icon(fileIconName, 24));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error creating icon:", fileIconName, e);
|
console.error("Error creating icon:", fileIconName, e);
|
||||||
// Fallback to default file icon
|
// Fallback to default file icon
|
||||||
icon.appendChild(icon("file", 24));
|
iconContainer.appendChild(icon("file", 24));
|
||||||
}
|
}
|
||||||
|
|
||||||
const badge = document.createElement("span");
|
const badge = document.createElement("span");
|
||||||
@ -3232,7 +3232,7 @@
|
|||||||
this.toggleBookmark(file.vault, file.path, file.title, card);
|
this.toggleBookmark(file.vault, file.path, file.title, card);
|
||||||
});
|
});
|
||||||
|
|
||||||
header.appendChild(icon);
|
header.appendChild(iconContainer);
|
||||||
header.appendChild(badge);
|
header.appendChild(badge);
|
||||||
header.appendChild(bookmarkBtn);
|
header.appendChild(bookmarkBtn);
|
||||||
card.appendChild(header);
|
card.appendChild(header);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user