From 56e13c79ca8377de55eb9b0c1aad90acd9dda74f Mon Sep 17 00:00:00 2001 From: kylejwatson Date: Sun, 2 Aug 2020 15:52:48 +0100 Subject: [PATCH] Splice fix --- src/renderer/components/ft-toast/ft-toast.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/ft-toast/ft-toast.js b/src/renderer/components/ft-toast/ft-toast.js index 370325f7..79a49c50 100644 --- a/src/renderer/components/ft-toast/ft-toast.js +++ b/src/renderer/components/ft-toast/ft-toast.js @@ -21,7 +21,7 @@ export default Vue.extend({ }, close: function (toast) { // Wait for fade-out to finish - setTimeout(this.remove, 300, this.toasts.length) + setTimeout(this.remove, 300, 0) toast.isOpen = false }, @@ -36,7 +36,7 @@ export default Vue.extend({ }, remove: function(index) { const removed = this.toasts.splice(index, 1) - clearTimeout(removed.timeout) + clearTimeout(removed[0].timeout) } }, })