multixy: better npoints safe check
This commit is contained in:
parent
fae6614d4e
commit
be90e02935
1 changed files with 3 additions and 1 deletions
|
|
@ -74,7 +74,9 @@ class MultiXy extends Pad {
|
|||
|
||||
super(options)
|
||||
|
||||
this.npoints = Math.max(Array.isArray(this.getProp('points')) ? this.getProp('points').length : this.getProp('points') || 1, 1)
|
||||
this.npoints = Array.isArray(this.getProp('points')) ? this.getProp('points').length : parseInt(this.getProp('points'))
|
||||
|
||||
if (isNaN(this.npoints) || this.points < 1) this.npoints = 1
|
||||
|
||||
this.preventChildrenTouchState = true
|
||||
this.pads = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue