From 947afe85f0eaa63f4f1fa6979e4d3a39ab6457a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 25 Dec 2012 16:59:05 +0100 Subject: [PATCH] Simplify Path#initialize() code. --- src/path/Path.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index 9fdb762f..62a11f18 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -51,8 +51,8 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ // Support both passing of segments as array or arguments // If it is an array, it can also be a description of a point, so // check its first entry for object as well - this.setSegments(!segments || !Array.isArray(segments) - || typeof segments[0] !== 'object' ? arguments : segments); + this.setSegments(Array.isArray(segments) + && typeof segments[0] === 'object' ? segments : arguments); }, clone: function() {