fix: 更新JSON导入检查 (#523)

This commit is contained in:
Nothing1024 2023-03-12 09:49:45 +08:00 committed by GitHub
parent cf03b65a4d
commit 84a19aafc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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) {