diff --git a/src/components/Toast.tsx b/src/components/Toast.tsx index 55cc367c0..dff1bfacf 100644 --- a/src/components/Toast.tsx +++ b/src/components/Toast.tsx @@ -166,10 +166,11 @@ export class ToastComponent extends React.Component< } = this.props; const items = this.state.items; - const groupItems = groupBy(items, item => item.position || position); + const groupedItems = groupBy(items, item => item.position || position); + + return Object.keys(groupedItems).map(position => { + const toasts = groupedItems[position]; - return Object.keys(groupItems).map(position => { - const items = groupItems[position]; return (
- {items.map((item, index) => ( + {toasts.map(item => (