TypeError: snapshot.forEach is not a function
问题 I am new to nodejs and Google Cloud FireStore. So here is my code. createNewPage = function (title, header, content, db ) { let pageRef = db.collection("pages").doc(title.trim()); let setPage = pageRef.set({ title: title, header: header, content: content }); return pageRef; } const printPage = function(Page) { Page.get().then(snapshot => { if (snapshot.empty){ console.log("No matching documents"); return; } snapshot.forEach(doc => { console.log(doc.id, '=>',doc.data()) }) }) .catch(err => {