【发布时间】:2020-05-12 06:25:45
【问题描述】:
我的 Firebase 函数出现问题,我从 Firestore 获取集合,并尝试在 nodejs 中本地更改其值(不将其上传回 Firestore),但值保持不变,try/catch 不是返回任何错误。 这是我的代码:
function setValueInArray(indexArray, array) {
console.log("SetValueInArray");
for (var index of indexArray) {
console.log(array[index].data().value); // **Logs false**
console.log("_________");
array[index].data().value = true;
console.log(array[index].data().value); // **Logs false**
}
}
【问题讨论】:
标签: javascript node.js firebase google-cloud-firestore