From 84a19aafc2a847210d8739e6ee77fe9e58c96853 Mon Sep 17 00:00:00 2001 From: Nothing1024 <78358913+Nothing1024@users.noreply.github.com> Date: Sun, 12 Mar 2023 09:49:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0JSON=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=20(#523)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/PromptStore/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/common/PromptStore/index.vue b/src/components/common/PromptStore/index.vue index 97b5675..80efb08 100644 --- a/src/components/common/PromptStore/index.vue +++ b/src/components/common/PromptStore/index.vue @@ -145,6 +145,8 @@ const importPromptTemplate = () => { try { const jsonData = JSON.parse(tempPromptValue.value) for (const i of jsonData) { + if (!('key' in i) || !('value' in i)) + throw new Error('键值不匹配') let safe = true for (const j of promptList.value) { if (j.key === i.key) {