Skip to content

Conversation

@hapticdata
Copy link
Contributor

Description: onVRPresentChange throws error that evt.display is undefined. The display property exists under CustomEvent#detail property and not directly on CustomEvent.

Changes proposed:

  • look for the isPresenting at evt.detail.display.isPresenting

@ngokevin
Copy link
Member

ngokevin commented Aug 1, 2017

Which platform/browser? Sure it's not on the event iself? https://w3c.github.io/webvr/spec/1.1/#interface-vrdisplayevent

@hapticdata
Copy link
Contributor Author

ah, right. I forgot I ran into this on webvr-ui as well.

When using the WebVR API it is directly on event.display when using a polyfill it is placed inside the CustomEvent's detail property.

Pull request updated to look for either.

@hapticdata
Copy link
Contributor Author

this fixes issue #2849

@ngokevin ngokevin merged commit c4d6a68 into aframevr:master Aug 1, 2017
@ngokevin
Copy link
Member

ngokevin commented Aug 1, 2017

thanks!

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.

2 participants