Skip to content

Conversation

@FlorisVedder
Copy link

Based on the #15030 PR.
Forked from christophehenry and added the changes as discussed in that PR.

Provides the ability to connect midi controls in javascript without the need to define the elements in the .xml file.

FlorisVedder added a commit to FlorisVedder/Mixxx-Controller-Mapping-Akai-AMX that referenced this pull request Oct 19, 2025
* @param {ComponentOptions | [number, number]} options Component configuration
* @class
*/
const Component = function(options = {}) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implemented here the default value = {} as suggested here. #15030 (comment)
But after testing the last weeks I strongly recommend to replace that solution for the early return solution.
With options = {} I'm able to let mixxx crash pretty easy.

if (typeof options === "undefined") {
  return;
}

Does anyone know is there should be a usecase for providing the undefined options argument with an empty object {} or isn't it and is it valid to abort execution of that function by using the early return.

The easiest way for me to trigger the errors is by switching functionality with connect and disconnect as discussed here: https://mixxx.zulipchat.com/#narrow/channel/113295-controller-mapping/topic/How.20to.20use.20disconnect.28.29.20to.20toggle.20layers.3F/with/543714830
Mixxx then either crashes or trigger other controls then configured.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to say that I only have these issues with mixxx 2.6-beta. I don't have them with 2.5. So the issues are not entirely due to the mapping or the components js file. But it seems that they are triggered less with the early return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants