【发布时间】:2021-01-13 02:53:14
【问题描述】:
当我将未定义的参数传递给我的云函数时,它被检测为 null。例如,如果我有这个:
const a = undefined;
firebase.functions().httpsCallable("myFunction")({
a
});
在我的云功能中我会这样做:
...
.https.onCall(async (data, context) => {
const {a} = data;
console.log(a);
...
});
它打印“null”而不是“undefined”。
我的功能:空
为什么?
【问题讨论】:
标签: javascript node.js firebase google-cloud-platform google-cloud-functions