multixy: set npoints to minimum 1 to avoid errors

This commit is contained in:
jean-emmanuel 2025-03-19 22:57:46 +01:00
parent 7d0d368a78
commit fae6614d4e
2 changed files with 6 additions and 1 deletions

View file

@ -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 = []