Skip to content

Commit a56a8aa

Browse files
Review
1 parent 42fa149 commit a56a8aa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/firestore/src/index/firestore_index_value_writer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,10 @@ export class FirestoreIndexValueWriter {
174174
): void {
175175
this.writeValueTypeLabel(encoder, INDEX_TYPE_REFERENCE);
176176
const path = DocumentKey.fromName(referenceValue).path;
177-
for (let i = 0; i < path.length; ++i) {
178-
const segment = path.get(i);
177+
path.forEach(segment => {
179178
this.writeValueTypeLabel(encoder, INDEX_TYPE_REFERENCE_SEGMENT);
180179
this.writeUnlabeledIndexString(segment, encoder);
181-
}
180+
});
182181
}
183182

184183
private writeValueTypeLabel(

0 commit comments

Comments
 (0)