Skip to content

Commit c4d6a68

Browse files
hapticdatangokevin
authored andcommitted
fix missing detail property in a-scene onVRPresentChange (#2920)
* fix missing detail property in a-scene onVRPresentChange * fix onVRPresentChange to check event and event.detail for display
1 parent e79f2f3 commit c4d6a68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/core/scene/a-scene.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,10 @@ module.exports.AScene = registerElement('a-scene', {
305305
*/
306306
onVRPresentChange: {
307307
value: function (evt) {
308+
// Polyfill places display inside the detail property
309+
var display = evt.display || evt.detail.display;
308310
// Entering VR.
309-
if (evt.display.isPresenting) {
311+
if (display.isPresenting) {
310312
this.enterVR(true);
311313
return;
312314
}

0 commit comments

Comments
 (0)