Skip to content

Commit b818145

Browse files
MaksimsMartin Valigursky
authored and
Martin Valigursky
committed
assume XRSession.enabledFeatures can be undefined (#7654)
1 parent ca16243 commit b818145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/framework/xr/xr-anchors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class XrAnchors extends EventHandler {
178178

179179
/** @private */
180180
_onSessionStart() {
181-
const available = this.manager.session.enabledFeatures.indexOf('anchors') !== -1;
181+
const available = this.manager.session.enabledFeatures?.indexOf('anchors') >= 0;
182182
if (!available) return;
183183
this._available = available;
184184
this.fire('available');

0 commit comments

Comments
 (0)