multixy: better npoints safe check

This commit is contained in:
jean-emmanuel 2025-03-20 09:14:13 +01:00
parent fae6614d4e
commit be90e02935

View file

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