Skip to content

Commit

Permalink
change id generation fix #530
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Dec 20, 2020
1 parent eac7f7b commit 2c614e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ function getToast(toastId: Id, { containerId }: ToastOptions) {
* Generate a random toastId
*/
function generateToastId() {
return (Math.random().toString(36) + Date.now().toString(36)).substr(2, 10);
return Math.random()
.toString(36)
.substr(2, 9);
}

/**
Expand Down

0 comments on commit 2c614e7

Please sign in to comment.