mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🐛 修复成就验证异常
This commit is contained in:
@@ -54,7 +54,7 @@ export async function getUiafHeader(): Promise<TGApp.Plugins.UIAF.Export> {
|
||||
*/
|
||||
export async function verifyUiafData(path: string): Promise<boolean> {
|
||||
const fileData: string = await fs.readTextFile(path);
|
||||
const ajv = new Ajv();
|
||||
const ajv = new Ajv({ strict: false });
|
||||
const validate = ajv.compile(UiafSchema);
|
||||
try {
|
||||
const fileJson = JSON.parse(fileData);
|
||||
@@ -65,7 +65,7 @@ export async function verifyUiafData(path: string): Promise<boolean> {
|
||||
color: "error",
|
||||
});
|
||||
await TGLogger.Error(`UIAF 数据验证失败,文件路径:${path}`);
|
||||
await TGLogger.Error(`错误信息 ${validate.errors}`);
|
||||
await TGLogger.Error(`错误信息 ${validate.errors?.toString()}`);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user