title: Object.assign keeps reference to original object
body: <p>I have method:</p>
  
  <pre><code>export const groupActivities = ({ activities, tags, images, tickets }) =&gt; {
    if (!activities || !tags) {
      console.error('Must have activities and tags');
    }
  
    const groupActivities = Object.assign({}, activities);
  
    const groups = groupByTags({ activities: groupActivities, tags });
  
    groups.forEach(group =&gt; {
      group.length = group.activities.length;
      console.log(group.length);
      group.activities.forEach(activity =&gt; {
        if (images) {
          activity.images = activity.imageIds.map(id =&gt; images[id]);
        }
  
        if (tickets) {
          console.warn('No tickets provided to the groupactivities helper. May cause problems.');
          activity.tickets = activity.ticketIds.map(id =&gt; tickets[id]);
        }
      });
    });
  
    return groups;
  };
  </code></pre>
  
  <p>Object.assign is copying the activities object, but still keeps references to it, so if I find a specific activity and change some property on it, it changes the original too! (changing groupActivities['someID'].name = 'name' changes the corresponding activity on activities object!)</p>
  
  <p>This is causing some weird bugs. Any solution?</p>
  
  <p>Using babel 5 for compiling.</p>