Skip to content

Commit

Permalink
Use Infinity instead of -1 for persistant toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
timolins committed Feb 13, 2021
1 parent 64b5568 commit a214271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/use-toaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useToaster = (toastOptions?: DefaultToastOptions) => {

const now = Date.now();
const timeouts = toasts.map((t) => {
if (t.duration === -1) {
if (t.duration === Infinity) {
return;
}

Expand Down

0 comments on commit a214271

Please sign in to comment.