Skip to content

Commit 80614ac

Browse files
committed
nits
1 parent 3e99a47 commit 80614ac

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/platform/assets/services/assetService.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)