diff --git a/templates/notifications/toast/toast.js b/templates/notifications/toast/toast.js index f4718dc..29d493e 100644 --- a/templates/notifications/toast/toast.js +++ b/templates/notifications/toast/toast.js @@ -73,7 +73,9 @@ fabric.Toast = function (timer) { // remove the toast object from the body when the animation completes setTimeout(function () { var el = document.querySelector('#' + toast.id); - el.parentNode.removeChild(el); + if (el != null) { + el.parentNode.removeChild(el); + } }, 300); } } @@ -81,4 +83,4 @@ fabric.Toast = function (timer) { return { showToast: _showToast }; -}; \ No newline at end of file +};