title: instanceof custom error class returning false
body: <p>Why does this result in false?</p>
  
  <pre><code>'use strict';
  
  class InvalidCredentialsError extends Error {
    constructor(msg) {
      super(msg);
      this.name = 'InvalidCredentialsError';
    }
  }
  
  const err = new InvalidCredentialsError('');
  
  console.log(err instanceof InvalidCredentialsError);
  </code></pre>
  
  <p>But this returns true:</p>
  
  <pre><code>console.log(err instanceof Error);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vQ6zG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vQ6zG.png" alt="enter image description here"></a></p>