Commit 624227bde5a076a081aff2a1d5c94673fa0eaaff

Authored by zhiyangdu
1 parent 16f0a3bd

wechatInfo兼容报错

Showing 1 changed file with 1 additions and 1 deletions
src/pages/common/common.vue
@@ -159,7 +159,7 @@ @@ -159,7 +159,7 @@
159 let wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i); 159 let wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i);
160 160
161 // 版本号 161 // 版本号
162 - if (wechatInfo[1]) { 162 + if (wechatInfo && wechatInfo[1]) {
163 163
164 // 拆分版本号/遍历数组值,转换成整数 164 // 拆分版本号/遍历数组值,转换成整数
165 this.$set(this.isWeChat, "version", wechatInfo[1].split(".")).forEach((value, index) => { 165 this.$set(this.isWeChat, "version", wechatInfo[1].split(".")).forEach((value, index) => {