[backport cloud/1.38] fix: show credit balance for unsubscribed personal workspaces (#8738)

Backport of #8719 to `cloud/1.38`

Automatically created by backport workflow.

Co-authored-by: Hunter <huntcsg@users.noreply.github.com>
This commit is contained in:
Comfy Org PR Bot
2026-02-08 13:30:25 +09:00
committed by GitHub
parent 47d5001833
commit 9d89a405cf

View File

@@ -254,9 +254,6 @@ const isLoadingBalance = isLoading
const displayedCredits = computed(() => {
if (initState.value !== 'ready') return ''
// Wait for subscription to load
if (subscription.value === null) return ''
if (!isActiveSubscription.value) return '0'
// API field is named _micros but contains cents (naming inconsistency)
const cents =
@@ -343,9 +340,7 @@ const toggleWorkspaceSwitcher = (event: MouseEvent) => {
}
const refreshBalance = () => {
if (isActiveSubscription.value) {
void fetchBalance()
}
void fetchBalance()
}
defineExpose({ refreshBalance })