Simplify Path#initialize() code.

This commit is contained in:
Jürg Lehni 2012-12-25 16:59:05 +01:00
parent 8f093f6dd7
commit 947afe85f0

View file

@ -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() {