mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 15:54:09 +00:00
Fix key usage
This commit is contained in:
@@ -597,9 +597,14 @@ const enterFolderView = async (asset: AssetItem) => {
|
||||
folderPromptId.value = promptId
|
||||
folderExecutionTime.value = executionTimeInSeconds
|
||||
|
||||
const folderItems = await resolveOutputAssetItems(metadata, {
|
||||
createdAt: asset.created_at
|
||||
})
|
||||
let folderItems: AssetItem[] = []
|
||||
try {
|
||||
folderItems = await resolveOutputAssetItems(metadata, {
|
||||
createdAt: asset.created_at
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('Failed to resolve outputs for folder view:', error)
|
||||
}
|
||||
|
||||
if (folderItems.length === 0) {
|
||||
console.warn('No outputs available for folder view')
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('useOutputStacks', () => {
|
||||
expect.objectContaining({ promptId: 'prompt-1' }),
|
||||
{
|
||||
createdAt: parent.created_at,
|
||||
excludeOutputKey: parent.name
|
||||
excludeOutputKey: 'node-1-outputs-parent.png'
|
||||
}
|
||||
)
|
||||
expect(isStackExpanded(parent)).toBe(true)
|
||||
|
||||
@@ -107,10 +107,16 @@ export function useOutputStacks({ assets }: UseOutputStacksOptions) {
|
||||
if (!metadata) {
|
||||
return []
|
||||
}
|
||||
|
||||
const excludeOutputKey =
|
||||
metadata.nodeId && metadata.subfolder
|
||||
? `${metadata.nodeId}-${metadata.subfolder}-${asset.name}`
|
||||
: undefined
|
||||
|
||||
try {
|
||||
return await resolveOutputAssetItems(metadata, {
|
||||
createdAt: asset.created_at,
|
||||
excludeOutputKey: asset.name
|
||||
excludeOutputKey
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('Failed to resolve stack children:', error)
|
||||
|
||||
Reference in New Issue
Block a user