优化:避免重复上报错误

pull/1027/head
ChenX 4 years ago
parent e2ca8284bd
commit 63c39d775b

@ -30,6 +30,8 @@ export class ErrorMonitoring
}
}
let stackSet = new Set();
export async function ReportError(stack: any, msg: string = "未捕获的错误!")
{
try
@ -42,6 +44,9 @@ export async function ReportError(stack: any, msg: string = "未捕获的错误!
return;
}
if (stackSet.has(stack)) return;
stackSet.add(stack);
let userName = localStorage.getItem(StoreageKeys.UserName);
let userPhone = localStorage.getItem(StoreageKeys.UserPhone);

Loading…
Cancel
Save