edinella/beat — pull request #13 by johnmarkos (2014-12-02 01:41:43+00:00)
Title: Fix load(beat) check for instanceof Beat.

Added test for load(beat) checking that beat is an instanceof Beat.

I noticed that the check was incorrect. `(!beat instanceof Beat)` was checking whether "not beat" was an instance of beat. The correct check is for `(!(beat instanceof Beat))`, that is: the negation is applied to the expression `(beat instanceof Beat)`.

I also changed `throw this.stack.error` to `throw new Error`, because `this.stack` was undefined.