diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-07-17 16:48:55 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-07-17 16:48:55 +0200 |
commit | 6f0c69028f5f958c03e1140dd44733e37dac2466 (patch) | |
tree | 6b7465cdb0370b4c9099dfd7dd950676d45abd5e /res/controllers/midi-components-0.0.js | |
parent | 21cafe18eba551ddb970299fef40458b6e2adb40 (diff) |
midi-components: Check if EffectUnit unitNumbers is undefined
Diffstat (limited to 'res/controllers/midi-components-0.0.js')
-rw-r--r-- | res/controllers/midi-components-0.0.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index f6cd894099..7d7b2165ad 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -818,9 +818,9 @@ this.setCurrentUnit(this.unitNumbers[index]); }; - if (Array.isArray(unitNumbers)) { + if (unitNumbers !== undefined && Array.isArray(unitNumbers)) { this.unitNumbers = unitNumbers; - } else if (typeof unitNumbers === "number" && + } else if (unitNumbers !== undefined && typeof unitNumbers === "number" && Math.floor(unitNumbers) === unitNumbers && isFinite(unitNumbers)) { this.unitNumbers = [unitNumbers]; |