only checking custom text if the data is sent to the back end

This commit is contained in:
Miodec 2021-02-06 21:33:05 +00:00
parent d08cfd45dc
commit 774a0124fa

View file

@ -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)