Skip to content

Commit 22ed675

Browse files
authored
Merge pull request #17838 from yhuangbrowser/disable_polyfill
HelioWebXRPolyfill: Fix illegal return statement error.
2 parents b6cb074 + 36429a0 commit 22ed675

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/js/vr/HelioWebXRPolyfill.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
* @author mvilledieu / http://github.com/mvilledieu
33
*/
44

5-
if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
6-
7-
if ( 'isSessionSupported' in navigator.xr ) return;
5+
if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator && 'isSessionSupported' in navigator.xr === false) {
86

97
console.log( "Helio WebXR Polyfill (Lumin 0.97.0)" );
108

@@ -14,7 +12,7 @@ if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {
1412

1513
if (
1614
"supportsSession" in navigator.xr === false &&
17-
"supportsSessionMode" in navigator.xr
15+
"supportsSessionMode" in navigator.xr
1816
) {
1917

2018
navigator.xr.supportsSession = function ( /*sessionType*/ ) {

0 commit comments

Comments
 (0)