title: firebase set failed first argument contains undefined in property
body: <p>When I create an event, I do this:</p>
  
  <pre><code>export const eventCreate = ({ title, time, location }) =&gt; {
    const newPostKey = firebase.database().ref('/events').push().key;
    const update = {};
  
    const postDetails = {
      eventId: newPostKey,
      title,
      ...
      goingNumber: 1,
      ...
    };
  
    update[`/events/${newPostKey}`] = postDetails;
  
    return (dispatch) =&gt; {
      firebase.database().ref()
        .update(update)
        .then(() =&gt; {
          dispatch({ type: EVENT_CREATE });
        })
        .then(() =&gt; newPostKey);
    };
  };
  </code></pre>
  
  <p>in the database:</p>
  
  <p><a href="https://i.stack.imgur.com/j6En7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j6En7.png" alt="enter image description here"></a></p>
  
  <p>later when I try to update the <code>goingNumber</code>:</p>
  
  <pre><code>export const eventSave = ({ goingNumber, eventId }) =&gt; {    
    return (dispatch) =&gt; {
      firebase.database().ref(`/events/${eventId}`)
        .set({ goingNumber })
        .then(() =&gt; {
          dispatch({ type: EVENT_SAVE_SUCCESS });
        });
    };
  };
  </code></pre>
  
  <p>I get this error saying:</p>
  
  <p><a href="https://i.stack.imgur.com/Ncnvi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ncnvi.png" alt="enter image description here"></a></p>