File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed 
src/platform/assets/services Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -113,18 +113,16 @@ function createAssetService() {
113113   * Checks if a widget input should use the asset browser based on both input name and node comfyClass 
114114   * 
115115   * @param  nodeType - The ComfyUI node comfyClass (e.g., 'CheckpointLoaderSimple', 'LoraLoader') 
116+    * @param  widgetName - The name of the widget to check (e.g., 'ckpt_name') 
116117   * @returns  true if this input should use asset browser 
117118   */ 
118119  function  isAssetBrowserEligible ( 
119120    nodeType : string  =  '' , 
120-     widgetName : string 
121+     widgetName : string   =   '' 
121122  ) : boolean  { 
123+     if  ( ! nodeType  ||  ! widgetName )  return  false 
122124    return  ( 
123-       ( nodeType  && 
124-         widgetName  && 
125-         useModelToNodeStore ( ) . getRegisteredNodeTypes ( ) [ nodeType ]  === 
126-           widgetName )  || 
127-       false 
125+       useModelToNodeStore ( ) . getRegisteredNodeTypes ( ) [ nodeType ]  ===  widgetName 
128126    ) 
129127  } 
130128
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments