@@ -87,7 +87,7 @@ window.addEventListener("unhandledrejection", function (event) {
"_trackEvent",
"全局Promise未处理错误",
window.location.pathname.replace(/=\w*/g, "=").replace(/\d+/g, "{id}"),
- event.reason.message.replace(/=\w*/g, "=").replace(/\d+/g, "{id}"),
+ event.reason?.message?.replace(/=\w*/g, "=").replace(/\d+/g, "{id}"),
]);
}
});
@@ -232,6 +232,6 @@ export async function getScreenShot({ cause = "ss-none" }) {
cause,
} finally {
- video.play();
+ video && video.play();