File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -257,11 +257,16 @@ class View3D extends React.Component {
257257 this . setState ( { componentLoaded : true } ) ;
258258 } ) ;
259259 } else if ( this . props . view3dMode === View3DMode . DISABLING && prevProps . view3dMode !== View3DMode . DISABLING ) {
260- this . map3dComponentRef . store3dState ( ) . then ( storedState => {
261- this . setState ( { storedState} ) ;
260+ if ( this . map3dComponentRef ) {
261+ this . map3dComponentRef . store3dState ( ) . then ( storedState => {
262+ this . setState ( { storedState} ) ;
263+ UrlParams . updateParams ( { v3d : undefined , bl3d : undefined } ) ;
264+ this . props . setView3dMode ( View3DMode . DISABLED ) ;
265+ } ) ;
266+ } else {
262267 UrlParams . updateParams ( { v3d : undefined , bl3d : undefined } ) ;
263268 this . props . setView3dMode ( View3DMode . DISABLED ) ;
264- } ) ;
269+ }
265270 } else if ( this . props . view3dMode === View3DMode . DISABLED && prevProps . view3dMode !== View3DMode . DISABLED ) {
266271 this . map3dComponent = null ;
267272 this . map3dComponentRef = null ;
You can’t perform that action at this time.
0 commit comments