mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-10-15 15:40:42 +00:00
fix: 更新JSON导入检查 (#523)
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user