From ef687ec869bbe77823b7a08721347761c3aee127 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Thu, 21 Oct 2021 22:21:01 +0100 Subject: [PATCH] [FIX] ensure batch isn't commited for every change --- functions/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/index.js b/functions/index.js index be9037a..233a361 100644 --- a/functions/index.js +++ b/functions/index.js @@ -949,6 +949,7 @@ exports.groupDeleted = functions.firestore.document("groups/{groupId}") if (counter >= 19) { batch.commit(); batch = db.batch(); + counter = 0; } }