浏览代码

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

Michael Wang 5 年之前
父节点
当前提交
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, "||||"),
   ]);