Skip to content
Advertisement

Tag: google-cloud-firestore

Multiple orderBy() in Firestore Query Produces Error

I want to query Firestore db and order by two fields. Official docs suggest I can simply combine the orderBy statements via orderBy(‘field1’).orderBy(‘field2’) but when I run similar code, I get the following error in console: Project.js:62 Uncaught (in promise) TypeError: (0 , firebase_firestore__WEBPACK_IMPORTED_MODULE_0__.orderBy)(…).orderBy is not a function My code: Why am I getting this error? Answer You’re mixing the

Advertisement