diff --git a/src/index.tsx b/src/index.tsx index aa2ba44..a8041a0 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -363,9 +363,10 @@ const Toast = (props: ToastProps) => { <> {toastType || toast.icon || toast.promise ? (
- {toast.promise || toastType === 'loading' + {toast.promise && toast.type === 'loading' && !toast.icon ? toast.icon || icons?.loading || getLoadingIcon() - : toast.icon || icons?.[toastType] || getAsset(toastType)} + : null} + {toast.type !== 'loading' ? toast.icon || icons?.[toastType] || getAsset(toastType) : null}
) : null} @@ -607,7 +608,7 @@ const Toaster = (props: ToasterProps) => { data-x-position={x} style={ { - '--front-toast-height': `${heights[0]?.height}px`, + '--front-toast-height': `${heights[0]?.height || 0}px`, '--offset': typeof offset === 'number' ? `${offset}px` : offset || VIEWPORT_OFFSET, '--width': `${TOAST_WIDTH}px`, '--gap': `${GAP}px`,