Эх сурвалжийг харах

JS错误统计: 具体到页面,缩小查错范围

Michael Wang 5 жил өмнө
parent
commit
175dad8360
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      src/utils/monitors.js

+ 1 - 1
src/utils/monitors.js

@@ -40,7 +40,7 @@ window.addEventListener("error", function(event) {
   // );
   window._hmt.push([
     "_trackEvent",
-    "全局JS错误",
+    "全局JS错误:" + window.location.pathname,
     event.message,
     event.error.stack.replace(/\n/g, "||||"),
   ]);