From 99f1dddef14073f359cec71a3f5973dabbb552d4 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sat, 29 Jul 2023 13:42:31 +0200 Subject: [PATCH] Fixed index --- examples/firebase/functions/src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/firebase/functions/src/index.js b/examples/firebase/functions/src/index.js index 08c7c08..94c73b1 100644 --- a/examples/firebase/functions/src/index.js +++ b/examples/firebase/functions/src/index.js @@ -101,8 +101,8 @@ exports.pass = functions.https.onRequest(async (request, response) => { } const isElementInLastTwoPositions = - index === request.body.secondary.length - 2 || - index === request.body.secondary.length - 1; + i === request.body.secondary.length - 2 || + i === request.body.secondary.length - 1; newPass.secondaryFields.push({ key: `secondary${i}`, @@ -122,8 +122,8 @@ exports.pass = functions.https.onRequest(async (request, response) => { } const isElementInLastTwoPositions = - index === request.body.auxiliary.length - 2 || - index === request.body.auxiliary.length - 1; + i === request.body.auxiliary.length - 2 || + i === request.body.auxiliary.length - 1; newPass.auxiliaryFields.push({ key: `auxiliary${i}`,