File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const DPS = 5;
29
29
30
30
const parseHash = ( ) : Store => {
31
31
const params = new URLSearchParams ( window . location . hash . substring ( 1 ) ) ;
32
- const getNum = ( key : string ) => parseFloat ( params . get ( key ) ) ;
32
+ const getNum = ( key : string ) => parseFloat ( params . get ( key ) || '0' ) ;
33
33
34
34
return {
35
35
position : {
@@ -39,11 +39,11 @@ const parseHash = (): Store => {
39
39
rotation : getNum ( 'rotation' )
40
40
} ,
41
41
featureLayers : ( params . get ( 'layers' ) ?? '' ) . split ( ',' ) . filter ( x => x ) ,
42
- baseLayer : parseInt ( params . get ( 'baseLayer' ) ) || 0 ,
42
+ baseLayer : parseInt ( params . get ( 'baseLayer' ) ?? '0' ) || 0 ,
43
43
label : {
44
44
lat : getNum ( 'lla' ) ,
45
45
lng : getNum ( 'llo' ) ,
46
- text : params . get ( 'lab' )
46
+ text : params . get ( 'lab' ) ?? ''
47
47
} ,
48
48
page : params . get ( 'page' ) as Pages
49
49
}
You can’t perform that action at this time.
0 commit comments