Skip to content

Commit

Permalink
fix: 更新JSON导入检查 (Chanzhaoyu#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nothing1024 authored and jingChen55 committed Mar 27, 2023
1 parent 56ce2a7 commit 3f3ce16
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 3f3ce16

Please sign in to comment.