mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-26 06:05:56 +00:00
This PR replaces the maximum id from `Number.MAX_VALUE` to `Number.MAX_SAFE_INTEGER` in `use-toast.ts`. Considering how JS stores numbers, it's unsafe to plus one if the number is larger than `Number.MAX_SAFE_INTEGER`. Here is an example: ```js > let num > num = Number.MAX_VALUE - 1 > num + 1 === num true > num = Number.MAX_SAFE_INTEGER - 1 > num + 1 === num false ```