Skip to content

Commit 09c888e

Browse files
authored
Fix: Selected assets count not updating in Imported tab (#6842)
## Summary - Fix bug where the "Selected assets count" displayed as 0 in the Imported tab when selecting assets ## Root Cause The `getOutputCount` function was returning `0` when `user_metadata.outputCount` was not present. - **Generated tab**: Works correctly because `outputCount` metadata is set during generation - **Imported tab**: `outputCount` metadata is never set, so it always returns `0` → selected count shows as 0 ## Solution Changed the default return value from `0` to `1` when `outputCount` metadata is not present, ensuring every asset counts as at least 1. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 6d41e8b commit 09c888e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/sidebar/tabs/AssetsSidebarTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const shouldShowDeleteButton = computed(() => {
214214
215215
const getOutputCount = (item: AssetItem): number => {
216216
const count = item.user_metadata?.outputCount
217-
return typeof count === 'number' && count > 0 ? count : 0
217+
return typeof count === 'number' && count > 0 ? count : 1
218218
}
219219
220220
const shouldShowOutputCount = (item: AssetItem): boolean => {

0 commit comments

Comments
 (0)