multixy: set npoints to minimum 1 to avoid errors
This commit is contained in:
parent
7d0d368a78
commit
fae6614d4e
2 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.28.4
|
||||
|
||||
- bug fixes
|
||||
- multixy: error when `points` is `0` (or empty array)
|
||||
|
||||
## 1.28.3
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class MultiXy extends Pad {
|
|||
|
||||
super(options)
|
||||
|
||||
this.npoints = Array.isArray(this.getProp('points')) ? this.getProp('points').length : this.getProp('points') || 0
|
||||
this.npoints = Math.max(Array.isArray(this.getProp('points')) ? this.getProp('points').length : this.getProp('points') || 1, 1)
|
||||
|
||||
this.preventChildrenTouchState = true
|
||||
this.pads = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue