From 4c839e559e0aa8bf1ffd3b24ea13f8e34673a8fd Mon Sep 17 00:00:00 2001 From: gregfenton Date: Mon, 16 Aug 2021 10:45:36 -0400 Subject: [PATCH 1/2] Remove unused function parameter A resolution to issue #221 --- firestore/test.solution-counters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore/test.solution-counters.js b/firestore/test.solution-counters.js index c8c62fe6..013d6a0e 100644 --- a/firestore/test.solution-counters.js +++ b/firestore/test.solution-counters.js @@ -22,7 +22,7 @@ function createCounter(ref, num_shards) { // [END create_counter] // [START increment_counter] -function incrementCounter(db, ref, num_shards) { +function incrementCounter(ref, num_shards) { // Select a shard of the counter at random const shard_id = Math.floor(Math.random() * num_shards).toString(); const shard_ref = ref.collection('shards').doc(shard_id); From dcf749abcce55c281cdbaa0f086bd1292a225178 Mon Sep 17 00:00:00 2001 From: gregfenton Date: Mon, 22 May 2023 12:45:24 -0400 Subject: [PATCH 2/2] Update test.solution-counters.js remove unused parameter from example calls to the function --- firestore/test.solution-counters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firestore/test.solution-counters.js b/firestore/test.solution-counters.js index 013d6a0e..c7c51cff 100644 --- a/firestore/test.solution-counters.js +++ b/firestore/test.solution-counters.js @@ -67,7 +67,7 @@ describe("firestore-solution-counters", () => { // Create a counter, then increment it const ref = db.collection('counters').doc(); return createCounter(ref, 10).then(() => { - return incrementCounter(db, ref, 10); + return incrementCounter(ref, 10); }); }); @@ -75,7 +75,7 @@ describe("firestore-solution-counters", () => { // Create a counter, increment it, then get the count const ref = db.collection('counters').doc(); return createCounter(ref, 10).then(() => { - return incrementCounter(db, ref, 10); + return incrementCounter(ref, 10); }).then(() => { return getCount(ref); });