Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix options menu not opening #1702

Merged
merged 1 commit into from
Oct 3, 2019
Merged

Conversation

IvoFPV
Copy link
Contributor

@IvoFPV IvoFPV commented Oct 1, 2019

To reproduce the bug:

  1. Without FC plugged in click Connect
  2. Abort the connecting process by clicking again on Connecting button
  3. Try to open settings menu

It was because of FEATURE_CONFIG not being properly initialized if the connection attempt was unsuccessful and FEATURE_CONFIG.isEnabled being called then when opening options menu.

@@ -537,7 +537,7 @@ function startProcess() {
analytics.setDimension(analytics.DIMENSIONS.CONFIGURATOR_EXPERT_MODE, checked ? 'On' : 'Off');
});

if (FEATURE_CONFIG) {
if (FEATURE_CONFIG && FEATURE_CONFIG.features !== 0) {
Copy link
Member

Choose a reason for hiding this comment

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

lol, considering that FEATURE_CONFIG.features is meant to be an instance of Feature, the default of 0 is confusing.
I think we should change the default to undefined and then check for that.

Copy link
Member

@mikeller mikeller left a comment

Choose a reason for hiding this comment

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

Good find.

@mikeller mikeller added this to the 10.6.0 milestone Oct 2, 2019
@mikeller mikeller merged commit 9028595 into betaflight:master Oct 3, 2019
@IvoFPV IvoFPV deleted the fix-option-menu branch March 29, 2021 19:23
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