Skip to content

Conversation

@yhuang-ml
Copy link

@yhuang-ml yhuang-ml commented Oct 30, 2019

Fixed #17837

@yhuang-ml yhuang-ml changed the title Fix #17837 Fix #17837 Illegal return statement error. Oct 30, 2019

if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator ) {

if ( 'isSessionSupported' in navigator.xr ) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please ensure to only use hard tabs in this file? It seems hard and soft tabs are mixed now which ruins proper formatting.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please. Check the files changed section to make sure your pr is clean:
https://github.com/mrdoob/three.js/pull/17838/files

Copy link
Author

@yhuang-ml yhuang-ml Oct 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Converts indentations to tabs and remove trailing spaces.

@Mugen87 Mugen87 changed the title Fix #17837 Illegal return statement error. HelioWebXRPolyfill: Fix illegal return statement error. Oct 30, 2019
@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2019

How about this:

if ( /(Helio)/g.test( navigator.userAgent ) && 'xr' in navigator && 'isSessionSupported' in navigator.xr === false ) {

@yhuang-ml
Copy link
Author

How about this:

if ( /(Helio)/g.test( navigator.userAgent ) && 'xr' in navigator && 'isSessionSupported' in navigator.xr === false ) {

Done

@mrdoob mrdoob added this to the r110 milestone Oct 30, 2019
@mrdoob mrdoob merged commit 22ed675 into mrdoob:dev Oct 30, 2019
@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2019

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Oct 30, 2019

@yhuangbrowser When do you think we'll be able to remove this file?

@yhuang-ml yhuang-ml deleted the disable_polyfill branch October 31, 2019 05:45
@yhuang-ml
Copy link
Author

@yhuangbrowser When do you think we'll be able to remove this file?

Thanks for merging the pr. I don't have a certain timeline now but my estimation is at least 3~4 months after our next software updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Illegal return statement error on console in WebVR examples

3 participants