summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian <git-developer@users.noreply.github.com>2020-11-26 08:09:19 +0100
committerChristian <git-developer@users.noreply.github.com>2020-11-26 08:09:19 +0100
commitfa9c738f906a79dcbc65871e3ec670984367d419 (patch)
tree48bf04d4875cdced5de203c0a6d832c6d83fdf12
parentca3deb8e3c135a3e8e635aa073305c45c9e09011 (diff)
fix(BCR2000): avoid warning about unknown control
-rw-r--r--res/controllers/midi-components-extension.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/res/controllers/midi-components-extension.js b/res/controllers/midi-components-extension.js
index 1afe106bdf..f1418c894a 100644
--- a/res/controllers/midi-components-extension.js
+++ b/res/controllers/midi-components-extension.js
@@ -484,7 +484,9 @@
*/
var DirectionEncoder = function(options) {
components.Encoder.call(this, options);
- this.previousValue = this.inGetValue(); // available only after call of Encoder constructor
+ if (this.group && this.inKey) { // undefined when called for prototype creation
+ this.previousValue = this.inGetValue(); // available only after call of Encoder constructor
+ }
};
DirectionEncoder.prototype = new components.Encoder({
min: 0,