From bd59e48682c7f75467673324160e7989b19c35d4 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Tue, 12 Apr 2011 13:48:44 +0200 Subject: [PATCH] Fix problem with Point constructor when passed { angle: 0, length: n }, by checking for undefined. --- src/basic/Point.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/Point.js b/src/basic/Point.js index dac0df42..10901f14 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -38,7 +38,7 @@ var Point = this.Point = Base.extend({ } else if (Array.isArray(arg0)) { this.x = arg0[0]; this.y = arg0.length > 1 ? arg0[1] : arg0[0]; - } else if (arg0.angle) { + } else if (arg0.angle !== undefined) { this.x = arg0.length; this.y = 0; this.setAngle(arg0.angle);