From 1d826ddf680d3e4e992d5bcffb932622236ef6de Mon Sep 17 00:00:00 2001 From: Natsumi Date: Mon, 3 May 2021 23:04:45 +1200 Subject: [PATCH] Limit error noty's properly --- html/src/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 780ac5c0..d97680f2 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -511,7 +511,6 @@ speechSynthesis.getVoices(); // FIXME : extra를 없애줘 API.$throw = function (code, error, extra) { - Noty.closeAll(); var text = []; if (code > 0) { var status = this.statusCodes[code]; @@ -529,7 +528,10 @@ speechSynthesis.getVoices(); } text = text.map((s) => escapeTag(s)).join('
'); if (text.length) { - new Noty({ + if (this.errorNoty) { + this.errorNoty.close(); + } + this.errorNoty = new Noty({ type: 'error', text }).show();