title: Firebase forEach is not updating correctly in my multi-location update
body: <p>So I'm still a little new to firebase so I'm not too sure if the way I am doing things are correct. But I have tried to create a like button and then use the multi-location update to update my data in different places. Everything works fine except for the ForEach function. The first time I press it nothing happens and then the next time it works and syncs with the data.</p>
  
  <p>Ive simplified my code so hopefully it easier to understand:</p>
  
  <pre><code>$scope.likePost = function(post) {
  
    var updatedLikeData = {};
    var addCountObj = {
      likesCount: (post.likesCount || 0) + 1,
    }
  
    updatedLikeData["path/to/update/"] = addCountObj;
    updatedLikeData["path/to/update/"] = addCountObj;
    updatedLikeData["path/to/update/"] = addCountObj;
  
    ref.child("userObjects").child("followers").child(post.userKey).on('value', function(snap) {
       if (snap.val() !== null &amp;&amp; snap.val() !== undefined) {
         followers = Object.keys(snap.val());
         followers.forEach(function(key) {
          updatedLikeData["path/to/update/" + key] = addCountObj;
             return updatedLikeData;
          });
         }
       });
  
    ref.update(updatedLikeData, function(error) {
      if(error) {
        console.log("Error updating entry data:", error);
       }
    })       
  }
  </code></pre>
  
  <p>So all of my other paths are updating the way that they should but the path in the forEach takes two clicks for it to be synced back up. I'm just wondering if there is something that I am missing or something that I should be doing to correct this problem.</p>