Explorar el Código

错误上报调整

jwyu hace 2 años
padre
commit
75a35550a4
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/utils/reportErr.js

+ 2 - 0
src/utils/reportErr.js

@@ -10,6 +10,7 @@ const reportErr=(app)=>{
             stack:err.stack
         }
         if(import.meta.env.MODE==='production'){
+            if(!errObj.msg||errObj.msg=='wx is not defined') return
             apiReportingErrInfo({errInfo:errObj})
         }
     }
@@ -21,6 +22,7 @@ const reportErr=(app)=>{
             stack:e.error?.stack
         }
         if(import.meta.env.MODE==='production'){
+            if(!errObj.msg||errObj.msg=='wx is not defined') return
             apiReportingErrInfo({errInfo:errObj})
         }
     })