Skip to content

Commit

Permalink
fix: 更新JSON导入检查 (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nothing1024 authored Mar 12, 2023
1 parent cf03b65 commit 84a19aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/common/PromptStore/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 84a19aa

Please sign in to comment.