Explorar el Código

兼容IOS 不支持断言匹配

Signed-off-by: skywolf627 <skywolf627@qq.com>
skywolf627 hace 3 años
padre
commit
007c863854
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Web/src/utils/auto-update.ts

+ 2 - 1
Web/src/utils/auto-update.ts

@@ -4,7 +4,8 @@
  */
 
 let lastSrcs: any[] | null; //上次js地址集合
-const scriptReg = /(?<=<script.*src=["']).*?(?=["'])/gm;
+// const scriptReg = /(?<=<script.*src=["']).*?(?=["'])/gm; //IOS 不支持断言匹配
+const scriptReg = /<script.*?src=['"](.*?)['"]/gm;
 
 /**
  * 获取最新的js集合