New issue
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
[Bug] The battery's isSupported is broken. #3688
Comments
Already exists pr #3634 |
I looked at other functions and it didn't added typeof either. Perhaps other functions also have this kind of bug? |
I found that Browers:
Chrome(https://cn.bing.com/chrome/newtab): Chrome(http://192.168.56.1:5173/): Cent Browser(https://hao.centbrowser.cn/): Cent Browser(http://192.168.56.1:5173/): Edge(http://192.168.56.1:5173/): Edge(https://www.hao123.com/): |
Describe the bug
Using only
xxx in xxx
to determine support can be problematic.I am using a new version of Microsoft Edge and my computer is a battery free computer.
To fix this, just add
typeof navigator.getBattery === 'function'
Reproduction
https://stackblitz.com/edit/vitejs-vite-tuyecr?file=src%2FApp.vue
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: