ignore invalid error event

This commit is contained in:
Yanzhen Yu
2021-12-22 21:25:58 +08:00
parent 3a6ef74a17
commit 28cdbe7745

View File

@@ -60,6 +60,10 @@ export const ErrorStackParser = {
* @return {Array} of StackFrames
*/
parse: function (error: Error): StackFrame[] {
// https://github.com/rrweb-io/rrweb/issues/782
if (!error) {
return [];
}
if (
// @ts-ignore
typeof error.stacktrace !== 'undefined' ||