bug fix for xiaomi (#6067)

This commit is contained in:
ChiaNing
2020-01-09 17:59:53 +08:00
committed by Jare Guo
parent 24102ee8cc
commit c55a382a82
+1 -1
View File
@@ -854,7 +854,7 @@ export class Game extends EventTarget {
if (this.renderType === Game.RENDER_TYPE_WEBGL) {
let useWebGL2 = (!!window.WebGL2RenderingContext);
const userAgent = navigator.userAgent.toLowerCase();
const userAgent = window.navigator.userAgent.toLowerCase();
if (userAgent.indexOf('safari') !== -1) {
if (userAgent.indexOf('chrome') === -1) {
useWebGL2 = false;