I have the following function:
async function loadGalleryImages2() { // load images for gallery
const collectionRef = db.collection('projects').doc(project.id).collection('images')
const docQuery = query(collectionRef, orderBy('displayOrder'))
}
where the declaration of docQuery causes the following error to appear in console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startAt')
If I remove the orderBy parameter as shown below, I do not get any error.
async function loadGalleryImages2() { // load images for gallery
const collectionRef = db.collection('projects').doc(project.id).collection('images')
const docQuery = query(collectionRef)
}
The firebase docs show similar examples so I'm not sure why this is causing errors.
