mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Simplify Path#initialize() code.
This commit is contained in:
parent
8f093f6dd7
commit
947afe85f0
1 changed files with 2 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue