From 774a0124fa23682c6aecf10d546933cd7c91ab75 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sat, 6 Feb 2021 21:33:05 +0000 Subject: [PATCH] only checking custom text if the data is sent to the back end --- functions/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/index.js b/functions/index.js index c55c239f7..c00fe345b 100644 --- a/functions/index.js +++ b/functions/index.js @@ -1300,14 +1300,17 @@ exports.testCompleted = functions.https.onRequest(async (request, response) => { (obj.mode === "time" && obj.mode2 < 15) || (obj.mode === "words" && obj.mode2 < 10) || (obj.mode === "custom" && + obj.customText !== undefined && !obj.customText.isWordRandom && !obj.customText.isTimeRandom && obj.customText.textLen < 10) || (obj.mode === "custom" && + obj.customText !== undefined && obj.customText.isWordRandom && !obj.customText.isTimeRandom && obj.customText.word < 10) || (obj.mode === "custom" && + obj.customText !== undefined && !obj.customText.isWordRandom && obj.customText.isTimeRandom && obj.customText.time < 15)