From 677702eee1ca6724d88fe2ccd06acf6dc8d20aae Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 11 Jul 2020 17:21:34 +0100 Subject: [PATCH] updated check if needs to check name function --- functions/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index a47a80d3d..783478dd2 100644 --- a/functions/index.js +++ b/functions/index.js @@ -146,7 +146,11 @@ exports.checkIfNeedsToChangeName = functions.https.onCall( .doc(request.uid) .get() .then((doc) => { - if (doc.data().name === undefined) { + if ( + doc.data().name === undefined || + doc.data().name === null || + doc.data().name === "" + ) { return admin .auth() .getUser(request.uid)