Rank 1: Thread
When a user signs up completely and they have their own unique document in the central user database, I have it stored into internal memory via Hive to later be compared with a new fetched document once realtime detects a change to it. I have a for loop to run through each value of the document to compare it to the original to see what changed. For whatever reason, the pendingFriendsList attribute always says it's length is different despite any changes. It seems that whenever I fetch the new/updated version from the DB (despite any changes), it has a default value of 1 (empty). But when the account gets the first instance of the document when finishing signing up, it's length is 0 (empty). When I add values to it, I do receive the correct amount. And when I delete them it goes back to 1. Why is it that whenever I receive the first instance of the Doc after signing up it's length is 0 and not 1?