How to distinguish between the reasons Firebase Transactions return null?
问题 From my understanding of Transactions, it can return null for two reasons: There is actually no value at the node where the transaction is being performed. The local cache is empty as Firebase Cloud Functions is stateless. Therefore, it may return null the very first time and it will re-run the function. My question is, how do we distinguish between these two cases? Or does firebase do the distinction by itself? Myref.transaction(function(currentData) { if(currentData != null) { return