File tree Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,12 @@ class ARButton {
107107 if ( navigator . xr . offerSession !== undefined ) {
108108
109109 navigator . xr . offerSession ( 'immersive-ar' , sessionInit )
110- . then ( onSessionStarted ) ;
110+ . then ( onSessionStarted )
111+ . catch ( ( err ) => {
112+
113+ console . warn ( err ) ;
114+
115+ } ) ;
111116
112117 }
113118
@@ -118,7 +123,12 @@ class ARButton {
118123 if ( navigator . xr . offerSession !== undefined ) {
119124
120125 navigator . xr . offerSession ( 'immersive-ar' , sessionInit )
121- . then ( onSessionStarted ) ;
126+ . then ( onSessionStarted )
127+ . catch ( ( err ) => {
128+
129+ console . warn ( err ) ;
130+
131+ } ) ;
122132
123133 }
124134
Original file line number Diff line number Diff line change @@ -73,7 +73,12 @@ class VRButton {
7373 if ( navigator . xr . offerSession !== undefined ) {
7474
7575 navigator . xr . offerSession ( 'immersive-vr' , sessionInit )
76- . then ( onSessionStarted ) ;
76+ . then ( onSessionStarted )
77+ . catch ( ( err ) => {
78+
79+ console . warn ( err ) ;
80+
81+ } ) ;
7782
7883 }
7984
@@ -84,7 +89,12 @@ class VRButton {
8489 if ( navigator . xr . offerSession !== undefined ) {
8590
8691 navigator . xr . offerSession ( 'immersive-vr' , sessionInit )
87- . then ( onSessionStarted ) ;
92+ . then ( onSessionStarted )
93+ . catch ( ( err ) => {
94+
95+ console . warn ( err ) ;
96+
97+ } ) ;
8898
8999 }
90100
Original file line number Diff line number Diff line change @@ -77,7 +77,12 @@ class XRButton {
7777 if ( navigator . xr . offerSession !== undefined ) {
7878
7979 navigator . xr . offerSession ( mode , sessionOptions )
80- . then ( onSessionStarted ) ;
80+ . then ( onSessionStarted )
81+ . catch ( ( err ) => {
82+
83+ console . warn ( err ) ;
84+
85+ } ) ;
8186
8287 }
8388
@@ -88,7 +93,12 @@ class XRButton {
8893 if ( navigator . xr . offerSession !== undefined ) {
8994
9095 navigator . xr . offerSession ( mode , sessionOptions )
91- . then ( onSessionStarted ) ;
96+ . then ( onSessionStarted )
97+ . catch ( ( err ) => {
98+
99+ console . warn ( err ) ;
100+
101+ } ) ;
92102
93103 }
94104
You can’t perform that action at this time.
0 commit comments