Fix type on LoadClip being marked as asset (#6207)

Previously, asset conversion was performed on any combo widget on a
valid node. As the `type` widget on LoadClip was also a combo widget, it
was being incorrectly converted.

This PR changes the isAssetBrowserEligible check to also verify the
widget name is correct.
<img width="694" height="174" alt="image"
src="https://github.com/user-attachments/assets/a8523ade-7f59-4480-b5e6-8782fd680106"
/>


┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6207-Fix-type-on-LoadClip-being-marked-as-asset-2946d73d3650811690f8d3a221a5b76d)
by [Unito](https://www.unito.io)
This commit is contained in:
AustinMroz
2025-10-22 19:37:40 -07:00
committed by GitHub
parent e5a0466e40
commit f63d0f3289
6 changed files with 45 additions and 40 deletions

View File

@@ -25,12 +25,12 @@ export const useModelToNodeStore = defineStore('modelToNode', () => {
const haveDefaultsLoaded = ref(false)
/** Internal computed for reactive caching of registered node types */
const registeredNodeTypes = computed(() => {
return new Set(
const registeredNodeTypes = computed<Record<string, string>>(() => {
return Object.fromEntries(
Object.values(modelToNodeMap.value)
.flat()
.filter((provider) => !!provider.nodeDef)
.map((provider) => provider.nodeDef.name)
.map((provider) => [provider.nodeDef.name, provider.key])
)
})
@@ -51,7 +51,7 @@ export const useModelToNodeStore = defineStore('modelToNode', () => {
})
/** Get set of all registered node types for efficient lookup */
function getRegisteredNodeTypes(): Set<string> {
function getRegisteredNodeTypes(): Record<string, string> {
registerDefaults()
return registeredNodeTypes.value
}