Skip to content

Commit 8a402bc

Browse files
committed
fix: Unbound mutual recursion between the composables.
1 parent 08f8cdc commit 8a402bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/composables/auth/useFirebaseAuthActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export const useFirebaseAuthActions = () => {
2222
const authStore = useFirebaseAuthStore()
2323
const toastStore = useToastStore()
2424
const { wrapWithErrorHandlingAsync, toastErrorHandler } = useErrorHandling()
25-
const { isActiveSubscription } = useSubscription()
2625

2726
const accessError = ref(false)
2827

@@ -84,6 +83,7 @@ export const useFirebaseAuthActions = () => {
8483
)
8584

8685
const purchaseCredits = wrapWithErrorHandlingAsync(async (amount: number) => {
86+
const { isActiveSubscription } = useSubscription()
8787
if (!isActiveSubscription.value) return
8888

8989
const response = await authStore.initiateCreditPurchase({

0 commit comments

Comments
 (0)