Skip to content

Commit 2806406

Browse files
authored
fix(toast): destroy toast after onremove callback
The onRemove callback was called after the this reference was destroyed
1 parent 85bc292 commit 2806406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/definitions/modules/toast.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@
117117
if ($toastBox) {
118118
module.debug('Removing toast', $toastBox);
119119
module.unbind.events();
120+
settings.onRemove.call($toastBox, element);
120121
$toastBox.remove();
121122
$toastBox = undefined;
122123
$toast = undefined;
123124
$animationObject = undefined;
124-
settings.onRemove.call($toastBox, element);
125125
$progress = undefined;
126126
$progressBar = undefined;
127127
$close = undefined;

0 commit comments

Comments
 (0)