We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这些判断浏览器的代码正则后直接用索引 [0] 获取?这就很容易报错了。 正则很可能旧不匹配,结果为 null
The text was updated successfully, but these errors were encountered:
@niceue 你好,此问题已修复了,请更新至 3.0.23版本
Sorry, something went wrong.
@a597873885 并没有修复。你可能是在 旧的 Edge 测试的,请升级到 Edge 102。
windows UA 为: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.41
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.41
另外Edge在 Android、iOS 平台的UA也不一致,参考 https://docs.microsoft.com/en-us/microsoft-edge/web-platform/user-agent-guidance#user-agent-strings
所以最终修复代码:
h=p.match(/Edg(?:A|iOS)?\/(\d+)\.\d+/gi)[0];
No branches or pull requests
这些判断浏览器的代码正则后直接用索引 [0] 获取?这就很容易报错了。
正则很可能旧不匹配,结果为 null
The text was updated successfully, but these errors were encountered: