-
Notifications
You must be signed in to change notification settings - Fork 955
Closed
Labels
Description
[REQUIRED] Describe your environment
- Operating System version: Ubuntu 21.04
- Browser version: Chrome 92
- Firebase SDK version: 9.0.0
- Firebase Product: Firestore
Note that I'm running Firestore in a web worker.
[REQUIRED] Describe the problem
Steps to reproduce:
got doc
is never logged (see code below)
Everything was fine with the v9 beta. The official, non-beta release broke it.
Relevant Code:
import {
collection, doc, getDoc, writeBatch, updateDoc, deleteDoc, onSnapshot, query, limit
} from '@firebase/firestore'
/* … */
export default {
/* … */
// get user by user ID
async getById(uid:string, db=defaultDb): Promise<User|null> {
const userDoc = doc(db, 'users', uid)
console.log("getting doc…")
const userSnap = await getDoc(userDoc).catch(errorInfo(`user ${uid} fetching`))
console.log("got doc")
return <User>userSnap.data() ?? null
}
/* … */
}
Related to #5398?