File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,8 @@ const Toast = (props: ToastProps) => {
254
254
return < Loader className = { cn ( classNames ?. loader , toast ?. classNames ?. loader ) } visible = { toastType === 'loading' } /> ;
255
255
}
256
256
257
+ const icon = toast . icon || icons ?. [ toastType ] || getAsset ( toastType ) ;
258
+
257
259
return (
258
260
< li
259
261
tabIndex = { 0 }
@@ -429,10 +431,12 @@ const Toast = (props: ToastProps) => {
429
431
</ button >
430
432
) : null }
431
433
{ /* TODO: This can be cleaner */ }
432
- { toastType || toast . icon || toast . promise ? (
434
+ { ( toastType || toast . icon || toast . promise ) &&
435
+ toast . icon !== null &&
436
+ ( icons ?. [ toastType ] !== null || toast . icon ) ? (
433
437
< div data-icon = "" className = { cn ( classNames ?. icon , toast ?. classNames ?. icon ) } >
434
438
{ toast . promise || ( toast . type === 'loading' && ! toast . icon ) ? toast . icon || getLoadingIcon ( ) : null }
435
- { toast . type !== 'loading' ? toast . icon || icons ?. [ toastType ] || getAsset ( toastType ) : null }
439
+ { toast . type !== 'loading' ? icon : null }
436
440
</ div >
437
441
) : null }
438
442
You can’t perform that action at this time.
0 commit comments