Skip to content

Commit

Permalink
Merge pull request #675 from ExpressLRS/fix-backpack-build
Browse files Browse the repository at this point in the history
Fix backpack build
  • Loading branch information
jurgelenas authored Sep 15, 2024
2 parents 89d7306 + 36210e9 commit 617decc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ui/views/ConfiguratorView/UserDefinesValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ export default class UserDefinesValidator {
],
]);

// if any regulatory domain options were present to the user it means that
// at least one of them has to be enabled
const regulatoryDomainKeys = Array.from(regulatoryDomains.values()).flat();
console.log('regulatoryDomainKeys', regulatoryDomainKeys);
const regulatoryDefines = data.filter(
({ key, enabled }) => regulatoryDomainKeys.includes(key) && enabled
const regulatoryDefines = data.filter(({ key }) =>
regulatoryDomainKeys.includes(key)
);
if (regulatoryDefines.length === 0) {
const enabledRegulatoryDefines = data.filter(({ enabled }) => enabled);
if (regulatoryDefines.length > 0 && enabledRegulatoryDefines.length === 0) {
results.push(
new Error('You must choose a regulatory domain for your device')
);
Expand Down

0 comments on commit 617decc

Please sign in to comment.