Skip to content

FIRDocumentChange newIndex not being set as NSNotFound #3298

Closed
@Ehesp

Description

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 10.2.1
  • Firebase SDK version: 5.20.2
  • Firebase Component: Firestore
  • Component version: 5.20.2 (I think)

[REQUIRED] Step 3: Describe the problem

When removing documents from a collection, the document changes for those removed documents contain the wrong value for the newIndex. The code states it should be equal to NSNotFound, however it's returning -1 which gets converted to 4294967295.

It's worth noting that oldIndex returns the correct value of NSNotFound.

Steps to reproduce:

  1. Add a document to a collection.
  2. Remove the document.
  3. View the newIndex of that document withing document changes.

image

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions