Environment
- Operating System version: macOS
- Browser version: Firefox v91
- Firebase SDK version: v9.0.1
- Firebase Product: firestore
Problem
Looks like there are an error in firebase collection method.
I try to create collection refference from collection reference and get unxpected path elements order.
Relevant Code:
import { getFirestore, collection } from 'firebase/firestore'
const artistsRef = collection(getFirestore(), '/events/some_event_id/artists')
const artistSongsRef = collection(artistsRef, 'some_artist_id', 'songs')
console.log(artistsRef.path) // events/some_event_id/artists
console.log(artistSongsRef.path) // events/some_event_id/artists/songs/some_artist_id <- ERROR it should be events/some_event_id/artists/some_artist_id/songs
I think this code cause problem https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/lite-api/reference.ts#L390