From 48bb52079554ac922cc5645ba2181b949eb06a8d Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 4 Jul 2020 02:44:08 +0100 Subject: [PATCH] made sure to return board info, and triple checking that the board is empty to not return uids --- functions/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index ef5e1ea38..041eb1974 100644 --- a/functions/index.js +++ b/functions/index.js @@ -928,7 +928,15 @@ exports.getLeaderboard = functions.https.onCall((request, response) => { return lbdata; } else { - return []; + if ( + lbdata.board === undefined || + lbdata.board === [] || + lbdata.board.length === 0 + ) { + return lbdata; + } else { + return []; + } } }); });