title: Cannot assign to read only property 'name' of object '[object Object]'
body: <p>The following code will throw an error only for the <code>name</code> property.
  It could be fixed by specifying <code>name</code> property as writable in <code>Object.create</code> arguments but <strong>I'm trying to understand why is this happening</strong>(and maybe there is a more elegant way to fix it).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var BaseClass = function (data) {
    Object.assign(this, data);
  }
  
  var ExtendedClass = function () {
    BaseClass.apply(this, arguments);
  }
  
  ExtendedClass.prototype = Object.create(BaseClass);
  
  console.log(new ExtendedClass({ type: 'foo' }));
  new ExtendedClass({ name: 'foo' });</code></pre>
  </div>
  </div>
  </p>