-
-
Notifications
You must be signed in to change notification settings - Fork 346
Closed
Description
Reproduction
not possible since nuxt template is not working properly
Steps to reproduce the bug
- Create a composable "useRecord" that uses useCollection or useDocument
- use this composable in any setup function
Expected behavior
The function useDocument returns the document ref properly without displaying the error "No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app)."
Actual behavior
"No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app)." is displayed.
Additional information
I debugged a little (like many hours) and found out, that it would work as expected if:
- the method "_useFirestoreRef" would call "docOrCollectionRef.firestore.app" instead of "useFirebaseApp()" for "getInitialValue()"
- the method "addPendingPromise" would call "dataSource.firestore.app" instead of "useFirebaseApp()" for "const app = useFirebaseApp()"
This adjustments were made in the dist folder in the file vuefire/dist/index.mjs
The retrieval of the default app (getApp()) does not seem to work if called from a composable. The selected app name does not seem to be used (if custom app names are used).
Metadata
Metadata
Assignees
Labels
No labels