Skip to content

Commit

Permalink
Fix #534 #483 toastId cannot be reused
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Dec 29, 2020
1 parent 0d523e2 commit 53f2cb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useToastContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function useToastContainer(props: ToastContainerProps) {
return !containerRef.current ||
(instance.props.enableMultiContainer &&
containerId !== instance.props.containerId) ||
(instance.isToastActive(toastId) && updateId == null)
(collection[toastId] && updateId == null)
? true
: false;
}
Expand All @@ -164,7 +164,7 @@ export function useToastContainer(props: ToastContainerProps) {
const { toastId, updateId } = options;
const { props } = instance;
const closeToast = () => removeToast(toastId);
const isNotAnUpdate = options.updateId == null; //!isToastActive(toastId);
const isNotAnUpdate = options.updateId == null;

if (isNotAnUpdate) toastCount++;

Expand Down

0 comments on commit 53f2cb7

Please sign in to comment.