Skip to content

Commit

Permalink
check arguemnt
Browse files Browse the repository at this point in the history
  • Loading branch information
markymark committed Jul 27, 2013
1 parent 4463dd7 commit b0e8d45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Written by: Mark Busenitz, [email protected]
exports.Vec = Vec;

exports.$V = function( a ) {
return new Vec( a[0], a[1] );
return instanceof a == Array ? new Vec( a[0], a[1] ) : Vec.Zero;
};

} )();
Expand Down

0 comments on commit b0e8d45

Please sign in to comment.