From 41b2f802905c501309808119e4b0b8d50992cd15 Mon Sep 17 00:00:00 2001 From: Sam Stern Date: Thu, 3 Jan 2019 08:26:32 -0800 Subject: [PATCH] Review feedback --- src/firestore/indexes.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/firestore/indexes.ts b/src/firestore/indexes.ts index cc163818..4631a5c7 100644 --- a/src/firestore/indexes.ts +++ b/src/firestore/indexes.ts @@ -60,7 +60,7 @@ export class FirestoreIndexes { } const indexPromises: Array> = []; - for (const index of indexesToDeploy) { + indexesToDeploy.forEach((index) => { const exists = existingIndexes.some((x) => this.indexMatchesSpec(x, index)); if (exists) { logger.debug(`Skipping existing index: ${JSON.stringify(index)}`); @@ -68,7 +68,7 @@ export class FirestoreIndexes { logger.debug(`Creating new index: ${JSON.stringify(index)}`); indexPromises.push(this.createIndex(project, index)); } - } + }); await Promise.all(indexPromises); if (existingFieldOverrides.length > fieldOverridesToDeploy.length) { @@ -80,7 +80,7 @@ export class FirestoreIndexes { } const fieldPromises: Array> = []; - for (const field of fieldOverridesToDeploy) { + fieldOverridesToDeploy.forEach((field) => { const exists = existingFieldOverrides.some((x) => this.fieldMatchesSpec(x, field)); if (exists) { logger.debug(`Skipping existing field override: ${JSON.stringify(field)}`); @@ -88,7 +88,7 @@ export class FirestoreIndexes { logger.debug(`Updating field override: ${JSON.stringify(field)}`); fieldPromises.push(this.patchField(project, field)); } - } + }); await Promise.all(fieldPromises); } @@ -582,7 +582,7 @@ export class FirestoreIndexes { fieldIndexes.forEach((index) => { const firstField = index.fields[0]; const mode = firstField.order || firstField.arrayConfig; - result += " (" + mode + ")"; + result += ` (${mode})`; }); } else { result += " (no indexes)";