Skip to content

Commit 6dacd58

Browse files
jparismorganlynndang
authored and
lynndang
committed
[quality] Check for 'vr-mode-ui' on sceneEl before acccessing it (#45)
1 parent d5bf6b6 commit 6dacd58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/device.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ if (isWebXRAvailable) {
3333
return;
3434
}
3535
if (sceneEl.hasLoaded) {
36-
sceneEl.components['xr-mode-ui'].updateEnterInterfaces();
36+
if (sceneEl.components['xr-mode-ui']) {
37+
sceneEl.components['xr-mode-ui'].updateEnterInterfaces();
38+
}
3739
} else {
3840
sceneEl.addEventListener('loaded', updateEnterInterfaces);
3941
}

0 commit comments

Comments
 (0)