From bbfe558353a3e2cb55d0e87738da6d81057757c5 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 22 Mar 2025 15:01:20 +0100 Subject: [PATCH] multixy: typo in npoints fix --- CHANGELOG.md | 5 +++++ src/client/widgets/pads/multixy.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ada0f25..e3050a9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ - add `onTouch` to all container widgets - allow starting a traversing gesture outside a touchable widget +## 1.28.5 + +- bug fixes + - multixy: error when `points` is `0` (or empty array) (again) + ## 1.28.4 - bug fixes diff --git a/src/client/widgets/pads/multixy.js b/src/client/widgets/pads/multixy.js index 6665ae69..011ea99e 100644 --- a/src/client/widgets/pads/multixy.js +++ b/src/client/widgets/pads/multixy.js @@ -76,7 +76,7 @@ class MultiXy extends Pad { 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 + if (isNaN(this.npoints) || this.npoints < 1) this.npoints = 1 this.preventChildrenTouchState = true this.pads = []