File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed 
streamlit_folium/frontend/src Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 22
33setuptools .setup (
44    name = "streamlit_folium" ,
5-     version = "0.6.8 " ,
5+     version = "0.6.9 " ,
66    author = "Randy Zwitch" ,
7788    description = "Render Folium objects in Streamlit" ,
Original file line number Diff line number Diff line change @@ -64,10 +64,13 @@ function onRender(event: Event): void {
6464  function  onLayerClick ( e : any )  { 
6565    const  global_data  =  __GLOBAL_DATA__ ; 
6666    global_data . last_object_clicked  =  e . latlng ; 
67+     let  details : Array < any >  =  [ ] ; 
6768    if  ( e . layer  &&  e . layer . toGeoJSON )  { 
6869      global_data . last_active_drawing  =  e . layer . toGeoJSON ( ) ; 
6970    } 
70-     let  details : Array < any >  =  global_data . drawnItems . toGeoJSON ( ) . features ; 
71+     if  ( global_data . drawnItems . toGeoJSON )  { 
72+       details  =  global_data . drawnItems . toGeoJSON ( ) . features ; 
73+     } 
7174    global_data . all_drawings  =  details ; 
7275    debouncedUpdateComponentValue ( ) 
7376  } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments