Skip to content

Build your personal knowledge base with Trilium Notes

fix(toast): add fallback if icon doesn't start with bx-

Elian Doraneb8f2021cbdb
diff --git a/apps/client/src/widgets/Toast.tsx b/apps/client/src/widgets/Toast.tsx
index 643cad551b..02ed6d3971 100644
--- a/apps/client/src/widgets/Toast.tsx
+++ b/apps/client/src/widgets/Toast.tsx
@@ -26,7 +26,7 @@ function Toast({ id, title, autohide, delay, progress, message, icon }: ToastOpt
}, [ autohide, id, delay ]);
const closeButton = <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close" />;
- const toastIcon = <Icon icon={icon} />;
+ const toastIcon = <Icon icon={icon.startsWith("bx ") ? icon : `bx bx-${icon}`} />;
return (
<div