title: FabricJS: Cannot read property of 'e' of undefined
body: <p>Getting the following error and even though I know what the error means (an object is undefined/null so its property e fails), I'm not sure why it's getting this error.  Pretty sure it is related to some FabricJS object and not just plain Javascript.  If anyone that knows FabricJS can help me out, that would be great.</p>
  
  <pre><code>fabric.js:8466 Uncaught TypeError: Cannot read property 'e' of undefined
      at klass.onMouseDown (fabric.js:8466)
      at HubConnection.&lt;anonymous&gt; (chat.js:128)
  </code></pre>
  
  <p>My code: This function is client side code for receiving a mousedown event from the server (which gets that info from the sending client). It create a new PencilBrush object on the receiving client, and starts it at the same position the sending client presses mousedown.  Basically I'm trying to display what the sending client is drawing to receiving client in live time, and this is one of the functions that helps with that.</p>
  
  <pre><code>connection.on("ReceiveMouseDown", function (user, coordinate) {  //coordinate is a string
  
          console.log("inside receive mouse down: " + coordinate); //this returns {x: value, y: value}
          var coordinateObject = JSON.parse(coordinate);  
          console.log('coordinateObject is: ' + coordinateObject);  //this returns [object object]
  
          brush = new fabric.PencilBrush(canvas);
          brush.onMouseDown(coordinateObject);  //this is line 128, exception occurs here
          //brush.onMouseDown(coordinate);  I have also tried this way, but same exception happens
          canvas.renderAll();
      });
  </code></pre>
  
  <p>My findings: I think the PencilBrush.onMouseDown() method takes a Pointer (as seen here <a href="http://fabricjs.com/docs/fabric.PencilBrush.html" rel="nofollow noreferrer">http://fabricjs.com/docs/fabric.PencilBrush.html</a> ), but the docs aren't very good at explaining what a Pointer object is. </p>