From 6ef09a3c096ae6530c8759ffef64485d1ddcae02 Mon Sep 17 00:00:00 2001 From: lulu Date: Mon, 30 Dec 2024 19:25:57 +0800 Subject: [PATCH] fix: cid list --- src/components/Modals/FileBlackListModal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Modals/FileBlackListModal.js b/src/components/Modals/FileBlackListModal.js index c127841..347d848 100644 --- a/src/components/Modals/FileBlackListModal.js +++ b/src/components/Modals/FileBlackListModal.js @@ -86,7 +86,8 @@ export default function FileBlackListModal({ color, closeModal, showModal }) { // setValidateMsg(t('validate_file_blacklist_cid1')) // return // } - let listArr = listVal.split('\n'); + let listArr1 = listVal.split('\n'); + let listArr = listArr1.filter(v=>v!== '') let validateCids = true; for (var v in listArr) { if (listArr[v] && !validateCid(listArr[v])) { @@ -99,6 +100,7 @@ export default function FileBlackListModal({ color, closeModal, showModal }) { return; } + try { await addFileBlackList(listArr, true); setLoading(false);