Skip to content

Commit 0caf0ca

Browse files
author
Akos Kitta
committed
fix: sanitize FQBNs from data store before compare
FQBNs can be detected with custom board configs. Make sure to sanitize all FQBNs before comparing them. Signed-off-by: Akos Kitta <[email protected]>
1 parent 2473435 commit 0caf0ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/ino-language.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ export class InoLanguage extends SketchContribution {
9292
`Failed to sanitize the FQBN of the running language server. FQBN with the board settings was: ${this.languageServerFqbn}`
9393
);
9494
}
95+
// The incoming FQBNs might contain custom boards configs, sanitize them before the comparison.
96+
// https://github.com/arduino/arduino-ide/pull/2113#pullrequestreview-1499998328
9597
const matchingFqbn = dataChangePerFqbn.find(
96-
(fqbn) => sanitizedFqbn === fqbn
98+
(fqbn) => sanitizedFqbn === sanitizeFqbn(fqbn)
9799
);
98100
const { boardsConfig } = this.boardsServiceProvider;
99101
if (

0 commit comments

Comments
 (0)