Skip to content

Commit

Permalink
fix: remove the instance before destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Jun 24, 2019
1 parent 8531f0d commit 77cf6fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export class Snackbar {
const { el, wrapper } = this
if (el) {
this.el = undefined
instances.splice(instances.indexOf(this), 1)
// Transition the snack away.
el.setAttribute('aria-hidden', 'true')
await new Promise(resolve => {
Expand Down

0 comments on commit 77cf6fe

Please sign in to comment.