File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,12 @@ function SmallSearchView(props: { points: QueryPoint[]; selectedProfile: Routing
101101 const from = props . points [ 0 ]
102102 const to = props . points [ props . points . length - 1 ]
103103 const isSmallHeight = useMediaQuery ( { query : '(max-height: 36rem)' } )
104- let icon = icons [ props . selectedProfile . name ]
104+ const icon = icons [ props . selectedProfile . name ]
105+ const iconElement = icon ? React . createElement ( icon ) : React . createElement ( icons . question_mark )
105106
106107 return (
107108 < div className = { styles . btnOpenContainer } onClick = { props . onClick } >
108- < div className = { styles . profile } > { React . createElement ( icon ) } </ div >
109+ < div className = { styles . profile } > { iconElement } </ div >
109110 < div className = { styles . mapView } >
110111 { ! isSmallHeight && < SmallQueryPoint text = { from . queryText } color = { from . color } position = { from . type } /> }
111112 { ! isSmallHeight && < IntermediatePoint points = { props . points } /> }
You can’t perform that action at this time.
0 commit comments