Skip to content

Commit

Permalink
fix(core): sortToast (#13)
Browse files Browse the repository at this point in the history
`[...instances]` worked in dev, but in prod will throw an error about `el.className` is `undefined`.
  • Loading branch information
2nthony authored Jun 23, 2020
1 parent e7211eb commit 0193e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function getTransitionEvent(el: HTMLDivElement): string | undefined {
}

function sortToast(): void {
const toasts = [...instances]
const toasts = Array.from(instances)
toasts.forEach((toast, index) => {
const i = toasts.length - index
const el = toast.el as HTMLDivElement
Expand Down

0 comments on commit 0193e38

Please sign in to comment.